Skip to content

Make lean3 an alias of Lean - #2546

Merged
jeanas merged 5 commits into
pygments:masterfrom
eric-wieser:lean3-alias
Oct 26, 2023
Merged

jeanas merged 5 commits into
pygments:masterfrom
eric-wieser:lean3-alias

Conversation

@eric-wieser

Copy link
Copy Markdown
Contributor

At some point there might be a push to make lean refer to Lean 4. This is consistent with how python2 is used for Python 2 code.

@Anteru

Anteru commented Oct 25, 2023

Copy link
Copy Markdown
Collaborator

This is broken now as I merged the other lean change. Would you mind rebasing this?

At some point there might be a push to make `lean` refer to Lean 4.
This is consistent with how `python2` is used for Python 2 code.
@eric-wieser

Copy link
Copy Markdown
Contributor Author

Done

@jeanas

jeanas commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

Looks good, but could you also add a definition Lean3Lexer = LeanLexer?

@jeanas

jeanas commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

(Hello @PatrickMassot :)

@eric-wieser

Copy link
Copy Markdown
Contributor Author

@jeanas: does the commit I just pushed look ok?

@jeanas

jeanas commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

Almost — __all__ should still contain LeanLexer.

@eric-wieser

Copy link
Copy Markdown
Contributor Author

Done; this results in the mapping file being updated too, but I guess that's ok?

@eric-wieser

Copy link
Copy Markdown
Contributor Author

Adding such an alias to __all__ breaks the test. I could switch to class LeanLexer(Lean3Lexer): pass if you prefer?

@jeanas

jeanas commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

Yes, it's ok. However, it now complains that there are several conflicting lexers for the same file types. Never mind, I'll fix it.

@eric-wieser

Copy link
Copy Markdown
Contributor Author

I think I found the fix

@jeanas

jeanas commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

Yes, looks right now.

@jeanas
jeanas merged commit 74fab4e into pygments:master Oct 26, 2023
@eric-wieser

Copy link
Copy Markdown
Contributor Author

Thanks!

@eric-wieser
eric-wieser deleted the lean3-alias branch October 26, 2023 11:19
@Anteru Anteru added this to the 2.17 milestone Nov 17, 2023
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.

3 participants