-
Notifications
You must be signed in to change notification settings - Fork 766
advance development of typst lexer #2656
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
Conversation
|
I'm not sure if you saw, but the Typst test file which was previously introduced is invalid, see #2596 (comment) (or that is what you meant by failing by design idk) |
I did not see the original typst file to be honest. I added my own tests which are much more specific and only parse individual snippets. See commit 93e9eea. There one of the tests is failing. Of course, this is due to the lexer not picking it up correctly. Think of it as TDD ;-) where the correct implementation is still missing. |
jeanas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delayed review. Please do the testing via our normal infrastructure with a file in tests/snippets/typst/, not with extra Python code, see https://pygments.org/docs/lexerdevelopment/#how-to-test-your-lexer.
|
Hi, since this wasn't updated in a while, I did some work on it.
All commits: https://github.com/Nerixyz/pygments/commits/fix/typst-advance/ @jonaspleyer let me know if I should PR the fixes to your branch or if I should open another PR here. |
To be honest I had kind of forgotten about this PR until today. I have had a brief glance on the individual commits (without too much depth) and they seem reasonable to me. I currently do not have the time to further contribute to this PR. Thus it would make sense to open a new one instead. Feel free to tag me once you have done so. Afterwards I will close this PR. Thanks for your effort. |
|
closing in favor of #2724 |
This PR adds multiple improvements to the existing typst lexer and some tests
I cannot guarantee that I will be working on this problem too much but wanted to get these commits out here.
Please tell me if the failing test prohibits merging. I can comment it out such that future development can reference it.
Happy about any feedback.