-
Notifications
You must be signed in to change notification settings - Fork 94
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
Extra trailing line gets inserted to code blocks on saving #150
Comments
Might be related or have the same root cause as the plenty issues described in #593, so possibly a duplicate. |
Still present with NC 20.0.7, markdown editor (by Robin Appelman) 2.3.3, qownnotes 21.1.3, see here. |
Seems to happen only when using code blocks in lists, especially if the last line with the code block separator is indented: test('failure with newline', () => {
const text = `
### Headline
* Some list item
\`\`\`
nano /var/www/html/config/config.php
\`\`\``
// markdown it already shows the issue
// expect(markdownit.render(text)).toBe("")
expect(markdownThroughEditor(markdownThroughEditor(text))).toBe(text)
}) The generated HTML that markdown it generates already contains a newline:
Not sure yet how to address that best yet though. |
Just creating a new file (md), adding a code block with text, saving/closing and re-opening does already trigger this issue (new line). I'm on NC24.0.1. |
@XueSheng-GIT: can confirm this behavior on NC23.0.5. |
Issues still exist. Please resolve the new line issue in code blocks |
For me this happens only in the editor, but the markdown source file does not contain the newline. |
Describe the bug
After i reopened a saved file, the formatting of the code block is wrong. See screenshots.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The reopened file should have the same formatting like before closing.
Screenshots
File i created:
Plain text:
After saving and reopening:
Client details:
Edit: It seems the code block uses the blank line.
The text was updated successfully, but these errors were encountered: