advance development of typst lexer#2656
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.
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.