-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix: Expand allowed characters in keys #4044 #4045
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,12 @@ export default function(hljs) { | |
const KEY = { | ||
className: 'attr', | ||
variants: [ | ||
// added brackets support | ||
{ begin: /\w[\w :()\./-]*:(?=[ \t]|$)/ }, | ||
// added brackets support | ||
{ begin: /\w[\w :()\./\-*@]*:(?=[ \t]|$)/ }, | ||
{ // double quoted keys - with brackets | ||
begin: /"\w[\w :()\./-]*":(?=[ \t]|$)/ }, | ||
begin: /"\w[\w :()\./\-*@]*":(?=[ \t]|$)/ }, | ||
{ // single quoted keys - with brackets | ||
begin: /'\w[\w :()\./-]*':(?=[ \t]|$)/ }, | ||
begin: /'\w[\w :()\./\-*@]*':(?=[ \t]|$)/ }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awesome! Can we please keep the Also, could we get a test case added to the markup tests to show that this works as intended? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @joshgoebel I moved the location of - and created a test file. When running the test, it looks like the picture below, is that right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hello! @joshgoebel. Can you please review this part? |
||
] | ||
}; | ||
|
||
|
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.
Should we add a look-ahead for
:
at the end perhaps to make sure these are keys?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.
@joshgoebel Should I add it if I think I need it? How should I do it