You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here we see that the newline between foo and bar is actually treated as a space (this is from the lexer). I think this isn't super intuitive and would be better replaced with a newline token - then whoever is doing the rendering can decide how they want to render these (in the usual case, to replace the newlines with spaces).
Alternatively, we could parse these all as part of the same paragraph, as a newline character, then consumers know that newlines in paragraphs don't end the paragraph (only two together would, and this wouldn't appear in our AST).
The text was updated successfully, but these errors were encountered:
GuiltyDolphin
changed the title
Lex Org newlines as newlines
Lex newlines in paragraphs as newlines
Jun 28, 2021
Check the AST at https://orga.js.org?text=foo%0Abar.
Here we see that the newline between
foo
andbar
is actually treated as a space (this is from the lexer). I think this isn't super intuitive and would be better replaced with a newline token - then whoever is doing the rendering can decide how they want to render these (in the usual case, to replace the newlines with spaces).Alternatively, we could parse these all as part of the same paragraph, as a newline character, then consumers know that newlines in paragraphs don't end the paragraph (only two together would, and this wouldn't appear in our AST).
The text was updated successfully, but these errors were encountered: