Line Breaks in .md file confuses rendering

Testing version:
1.0 (1648)

What were you doing:
Importing a markdown file that was line wrapped at 80 columns.

Example at https://raw.githubusercontent.com/grork/personal-blog/master/_posts/2021-03-21-decoupled-app-stores.md

What feature did you use:
Opening markdown files that already exist

What happened:

  • URLs were poorly imported
  • Text was rendered at the actual line break in the text file, not at the rendering width as one would expect

What did you expect to happen:

  • Parse URLs properly
  • Wrap at rendering width / paragraphs properly, not at the line breaks in the text file

Welcome!
Regarding the multiline URLs ([App\n Store](...), we decided not to allow them at the moment in Panda because they cause a lot of problems during the parsing phase.

I don’t fully understand what you are proposing for the paragraphs. We do have to respect line breaks in the document and I don’t think there are ways around it, but maybe I’m missing something and some editor/tool is doing what you are proposing.

Ah! URL parsing makes sense – a worthy exception.

However, it appears I have walked into a grey area around line wrapping. Based on some StackOverflow questions, which linked to CommonMark & John Gruber it seems that the OG Markdown doesn’t expect a single line feed to represent a paragraph or line break in the rendered output, but double-space-line-break should (or two line breaks). CommonMark seems to be more ambiguous. (Links at end)

The workflow I’m aiming for is:

  1. Write article in bear/panda
  2. Convert to markdown and line wrap to 80 col
  3. Share with world
  4. Make edits by opening up the md file in Panda

I accept (begrudgingly!) that when the file is saved again my wrapping would be lost, but on import, I expected it to follow my experience with full markdown renderers – which is not treat a single line break as a para.
Of note, my follow up testing showed the following:

  • VS Code Preview: doesn’t render line break!
  • Jekyll: Doesn’t render line break!
  • Drafts: Does render line break, and feels more like a “text” editor so may be ok
  • Ulysses: Does render line break, and feels like it is a document editor and thus shouldn’t render line breaks.

As noted in the StackOverflow article, Panda now has a command line option to change this behaviour.

(Follow links because as a new user I can only include 2, and the first links to the CommonMark discussion)

https://daringfireball.net/projects/markdown/syntax#p

Thanks for the follow-up. I’m aware of Gruber’s original vision on this matter but I disagree because based on our experience with Bear people do not expect to have ad a blank line to make a new paragraph. Also, we are hiding all or part of the markdown markers in the document, this will render the line wrap in a very odd way. I think this makes sense for “plain text” and strict markdown editors possibly using a monospace font only, otherwise the beauty of having all the rows ending at the same position is kind of lost.