Skip to content

Add syntax highlighting for Python match-case statements #2134

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Cheesecake2960
Copy link

This adds support for Python 3.10's match/case syntax.

Changes:

  • Added match and case to the list of Python keywords in the lexer
  • Updated the visual sample for Python syntax highlighting (in spec/visual/samples/python)

This is part of Python 3.10's structural pattern matching feature.


This is my first contribution to Rouge. I'm happy to receive any feedback!

@tancnle
Copy link
Collaborator

tancnle commented Jun 18, 2025

Duplicate of #1981.

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.

2 participants