I've submitted a bug report for this: https://github.com/streetwriters/notesnook/issues/9028
Notesnook markdown import help page says the importer has "100% support for CommonMark syntax".
Commonmark's hard-line-break spec shows two options for creating hard line-breaks (as distinct from paragraphs, which are created with two line breaks):
But Notesnook's markdown importer does not respect these line breaks, and replaces them with spaces instead.
Notably, Notesnook's markdown exporter does create commonmark-style hard line breaks when appropriate. This leads to a situation where importing a note exported by NN's markdown exporter results in bad formatting.
Steps to reproduce the problem
-
Create two markdown files, one for each of the commonmark hard line break options:
commonmark option 1 (two trailing spaces
—select the text to see):line 1 line 2 line 3 line 4 after paragraphcommonmark option 2 (trailing backslash
\):line 1\ line 2\ line 3 line 4 -
Import the markdown files into Notesnook
-
In both cases, the linebreaks are lost, replaced with spaces.
Additionally, you can see that Notesnook's markdown exporter already does implement commonmark's first option (two trailing spaces):
- In a Notesnook note, enter several lines, creating each new line by typing shift+enter
- Export the note in markdown
- Notice that the exported markdown has trailing double spaces for each hard line break
Note also that the exported Notesnook markdown also includes double spaces in places that are not part of commonmark's spec, such as at the end of a paragraph ("Hard line breaks are for separating inline content within a block. Neither syntax for hard line breaks works at the end of a paragraph or other block element")