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

Check for recovery mode and fix numeric list missparsing #41

Merged
merged 2 commits into from
Jun 18, 2023

Conversation

stsewd
Copy link
Owner

@stsewd stsewd commented Jun 18, 2023

I'm making the external scanner aware of tree-sitter correction mode (https://tree-sitter.github.io/tree-sitter/creating-parsers#other-external-scanner-details), this will hopefully help to move the parsing of text nodes to JS.

While doing this also found a bug

if (adornment == '(' && is_numeric_bullet(scanner->lookahead)) {
return parse_inner_numeric_bullet(scanner, true);
}

That is trying to parse the text as a numeric bullet, even if the token isn't valid in that context, a check for && valid_symbols[T_NUMERIC_BULLET] was added.

Fixes #31

@stsewd stsewd merged commit a41a933 into master Jun 18, 2023
@stsewd stsewd deleted the check-for-recovery-mode branch June 18, 2023 04:27
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

Successfully merging this pull request may close these issues.

Misparsing of paragraph
1 participant