-
Notifications
You must be signed in to change notification settings - Fork 49
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
Allow for no whitespace between code fence language id and attributes #63
Conversation
build.js
Outdated
@@ -80,7 +80,7 @@ const fencedCodeBlockDefinition = (name, identifiers, sourceScope, language, add | |||
|
|||
return `fenced_code_block_${name}: | |||
begin: | |||
(^|\\G)(\\s*)(\`{3,}|~{3,})\\s*(?i:(${identifiers.join('|')})(\\s+[^\`~]*)?$) | |||
(^|\\G)(\\s*)(\`{3,}|~{3,})\\s*(?i:(${identifiers.join('|')})(\\s*[^\`~]*)?$) |
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 believe this will cause false positive if users write a language name like pythonnotreally
(which we should not highlight as python)
Are there specific sets of characters that are used to start a list of attributes? Like {
?
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.
From my experience, it's either {
or :
but that's probably not a complete list. Still, could be enough for a start.
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.
Let's start with that. So either require ({
, :
, or a whitespace) before the attributes
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.
Done. Not sure that will appease CI, though.
Thanks. Can you also please add a test case for this new syntax |
Thanks! |
@mjbvz Thanks for the guidance! Can you estimate when this will be released? |
Closes #62.