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

Allow for escaped newlines in modules and headings #54

Open
CMDJojo opened this issue Feb 15, 2023 · 0 comments
Open

Allow for escaped newlines in modules and headings #54

CMDJojo opened this issue Feb 15, 2023 · 0 comments
Labels

Comments

@CMDJojo
Copy link
Member

CMDJojo commented Feb 15, 2023

Describe the bug
The language supports escaping new lines with \ directly preceeding the newline in paragraph text, and the intuition is (or should be) that it always does. However, it doesn't in module bodies, module invocations and headings due to searching for whitespace/newlines.

To Reproduce
This works:

# Heading at level 1
[foo arg1 arg2]"body text"

This, however, should produce the same result if backslashes always escapes newlines:

# Heading at \
level 1
[foo arg1 \
arg2]"body \
text"

Expected behavior
The two code blocks above should be parsed to the same AST

Additional context
There is probably a use for a custom parser taking a parser and applying it on the same line, taking escaped newlines into account. Using it in both heading parsing, module invocation parsing, module body parsing and paragraph text parsing should sync the behaviour up between the three contextes.

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

No branches or pull requests

2 participants