Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich text editor: Editing code blocks removes leading whitespace #10315

Closed
personalizedrefrigerator opened this issue Apr 15, 2024 · 1 comment · Fixed by #10321
Closed

Rich text editor: Editing code blocks removes leading whitespace #10315

personalizedrefrigerator opened this issue Apr 15, 2024 · 1 comment · Fixed by #10321
Labels
bug It's a bug desktop All desktop platforms editor high High priority issues

Comments

@personalizedrefrigerator
Copy link
Collaborator

Operating system

Linux

Joplin version

2.14.20, 3.0.2

Desktop version info

Joplin 3.0.2 (dev, linux)

Client ID: c4ee1ffb618e4576a7bf7477a5b942e6
Sync Version: 3
Profile Version: 47
Keychain Supported: No

Revision: 9fe3154

Backup: 1.4.1
Freehand Drawing: 2.9.1
RevealJS Integration: 0.12.0

Current behaviour

Currently, when editing a code block in the rich text editor, leading whitespace on the first line is lost.

rte-removes-leading-spaces.mp4

For example,

  1. Create a new note with the following content (markdown editor)
    ```foo
        line 1
        line 2
        line 3
    ```
  2. Switch to the rich text editor
  3. Double-click to edit the code block
  4. Add a new line (e.g. "line 4")
  5. Click "ok" to close the editor window
  6. Observe that the first line has lost its indentation

Expected behaviour

Code blocks should not lose indentation when editing them in the rich text editor.

Logs

No response

@personalizedrefrigerator personalizedrefrigerator added the bug It's a bug label Apr 15, 2024
@personalizedrefrigerator
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug desktop All desktop platforms editor high High priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant