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

Literal parser breaks with unmatched "<" #59

Open
feildmaster opened this issue Oct 10, 2021 · 0 comments
Open

Literal parser breaks with unmatched "<" #59

feildmaster opened this issue Oct 10, 2021 · 0 comments

Comments

@feildmaster
Copy link
Contributor

feildmaster commented Oct 10, 2021

https://github.com/wikimedia/banana-i18n/blob/master/src/ast.js#L116
const regularLiteral = wikilinks ? makeRegexParser(/^[^{}[\]$<\\]/) : makeRegexParser(/^[^{}$<\\]/)

Because of "special character" < in regularLiteral (which was added in the more recent HTML parser), the following line breaks:
This is a sentence with < in it.

Removing < (from regularLiteral) seems like it fixes the issue, but I don't have the repo locally to do any of the other tests.

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

No branches or pull requests

1 participant