notaapp / talk

Issues and discussions for the notes app, Nota.
https://nota.md
60 stars 1 forks source link

Option to treat newline as either soft or hard break #344

Closed borekb closed 1 year ago

borekb commented 1 year ago

Famously,

First line<ENTER>
Second line

can be rendered as both:

It's unfortunate that GitHub decided to do this but it's such a major Markdown-based platform that it cannot be ignored. I'd love if there was a way in Nota to have an option to treat newline as GitHub does – right now, it follows "only" CommonMark which always treats those as soft line breaks.

I'd even think about having a "pragma" in each file so that the behavior could be per-file. For example:

<!-- newline=hard-break -->

This document would render as on GitHub,
i.e., with hard breaks.

The option should affect at least two things:

What do you think? I know this is controversial but I've seen some MD editors do this (not per-file pragma but a global option, usually).