Skip to content
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

Hard line break support #21

Open
boltlessengineer opened this issue Jun 25, 2023 · 1 comment
Open

Hard line break support #21

boltlessengineer opened this issue Jun 25, 2023 · 1 comment

Comments

@boltlessengineer
Copy link

Norg spec doesn't seem to have a feature to put hard line break (<br/> in HTML) inside a paragraph.

I think escaped character can be an intuitive way to have it. GFM supports both \n and \\\n, but because Norg is free-form markup language, just \\\n would be a nice option.

example:

soft
line break

hard\
line break

other paragraph

converted to:

<p>soft
paragraph</p>
<p>hard<br/>line break</p>
<p>other paragraph</p>

which would be rendered like:

soft paragraph

hard
line break

other paragraph
@boltlessengineer boltlessengineer changed the title Forced line break support Hard line break support Jun 25, 2023
@vhyrro
Copy link
Member

vhyrro commented Jul 7, 2023

I realized that the current usage of \\n within norg is very counterintuitive. Currently when you use the escape character:

here is\
some text

The expected result (as per the spec) should be:

here issome text

However the \ char is more of a "make this verbatim". When you use \* you don't expect that character to be a bold marker (in other words, it should be rendered as-is). I'm happy to make \\n be the equivalent of <br>, and find another solution to the first code snippet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants