-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Python: Decorator support #1639
Conversation
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.
You need to leave a comment indicating the requested changes.
You need to leave a comment indicating the requested changes. |
@@ -0,0 +1,28 @@ | |||
@some.decorator(foobar) |
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.
Do we want to highlight the whole line as a decorator or just the @
symbol? How do other highlighters do it?
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.
I err towards highlighting @some.decorator
as Notepad++ and VS both do.
(VS Code doesn't highlight anything)
Wow that was quick. |
Add support for Python decorators, implementing PrismJS#1635 using the solution proposed by @spectras. Also add 2 aliases: `annotation` to be like Java and `punctuation` to change the actual color (like Java). This resolves PrismJS#1635.
This PR adds support for Python decorators implementing #1635 using the solution proposed by @spectras.
I also added 2 aliases:
annotation
to be like Java andpunctuation
to change the actual color (like Java).This resolves #1635.