Skip to content

Fix: regex fails to capture certain langs#30

Merged
TrueBrain merged 2 commits intoTrueBrain:mainfrom
Qrbaker:fix/regex-error-fix
Jul 14, 2022
Merged

Fix: regex fails to capture certain langs#30
TrueBrain merged 2 commits intoTrueBrain:mainfrom
Qrbaker:fix/regex-error-fix

Conversation

@Qrbaker
Copy link
Copy Markdown
Contributor

@Qrbaker Qrbaker commented Jul 13, 2022

Small fix that I noticed when testing various languages today:

Languages with non alphanumeric characters (i.e. c++)
would not be captured by the regex for syntax highlighting.

This change moves from a positive capture (all alphanumeric
characters) to a negative capture (anything that is NOT a ").

This should be a more robust solution... at least until some-
one invents a language with a " in the name.

Languages with non alphanumeric characters (i.e. c++)
would not be captured by the regex for syntax highlighting.

This change moves from a positive capture (all alphanumeric
characters) to a negative capture (anything that is NOT a ").

This should be a more robust solution... at least until some-
one invents a language with a " in the name.
Also adjusted the render() method to handle the arguments
expected from downstream overrides
@TrueBrain TrueBrain merged commit 2cc9a4d into TrueBrain:main Jul 14, 2022
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