Skip to content

Conversation

@Dacit
Copy link
Contributor

@Dacit Dacit commented Jun 10, 2022

In Isabelle, cartouches are nowadays widely used. However, they can not be parsed by the Isabelle lexer so lots of unparsed tokens are left over - this PR adds better support for them, as well as symbol names in their unicode representation.

Also fixes #1905 for Isabelle.

fix(lexer.theorem.isabelle): use whitespace token;
@jeanas
Copy link
Contributor

jeanas commented Jun 11, 2022

Could you add a test? Either modify the existing tests/examplefiles/isabelle/example.thy, or add tests/snippets/isabelle/cartouches.txt. In either case, run pytest --update-goldens tests/<examplefiles or snippets>/isabelle to update golden test output.

@jeanas
Copy link
Contributor

jeanas commented Jun 26, 2022

Ping @Dacit, do you need help?

@Dacit
Copy link
Contributor Author

Dacit commented Jun 28, 2022

Ping @Dacit, do you need help?

Thanks for the offer, I was just very busy and couldn't get to that until now. I'll add tests for that, and even a bit more functionality.

Fabian Huch added 2 commits June 28, 2022 12:11
feat(lexer.theorem.isabelle): support ascii and unicode sources equally well;
@Dacit
Copy link
Contributor Author

Dacit commented Jun 28, 2022

@jean-abou-samra added the tests, now separately for the ascii sources and their unicode rendering (the latter is often used in code snippets, whereas the former is how Isabelle sources are stored).

Copy link
Contributor

@jeanas jeanas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jeanas jeanas merged commit dab512c into pygments:master Jun 28, 2022
@Anteru Anteru added this to the 2.13.0 milestone Aug 14, 2022
@Anteru Anteru added the A-lexing area: changes to individual lexers label Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lexing area: changes to individual lexers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WIP - Whitespace lexing after Keywords - collecting issue

3 participants