adhocracy3 icon indicating copy to clipboard operation
adhocracy3 copied to clipboard

Pages markdown does not show a single newline

Open 2e2a opened this issue 8 years ago • 3 comments

Markdown description created in SDI uses\r\n as newline. This is not shown in the pages view.

Duplicate newlines introduce a new paragraph.

2e2a avatar Oct 24 '16 07:10 2e2a

Adding a newline with spaces at the end of the line works. The issue left, would be that the preview in SDI shows newlines that are not shown in the frontend.

2e2a avatar Oct 24 '16 09:10 2e2a

That is actually consitent with the spec (read the sections on both the hard and soft line breaks). A hard line break can be inserted with two spaces or a backslash.

The markdown parser used in the frontend has an option to enable github-style hard line breaks (breaks). I am not sure if we want that.

  • Pro: Consistent with editor in SDI.
  • Pro: Principle of least surprise
  • Contra: Tends to be misused (i.e. you should use proper paragraphs most of the time)

xi avatar Oct 24 '16 09:10 xi

There is an option for the SDI markdown editor to disable showing single line breaks. This would make it consistent with the frontend, if it also has support for the double space solution.

Contra: Tends to be misused (i.e. you should use proper paragraphs most of the time)

I agree to this point. We can keep the frontend as is and make the adjustments in SDI.

2e2a avatar Oct 24 '16 09:10 2e2a