-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
wrong bash beautifier colors #428
Comments
This is not an issue for the bash track. Exercism uses https://github.com/PrismJS/prism for syntax highlighting, so really the bug report should go there. |
This module uses regular expressions to parse code, which is a good-enough-but-not-perfect approach. Here's where they identify a quoted string: https://github.com/PrismJS/prism/blob/master/components/prism-bash.js#L122 |
There is a workaround: instead of ' syntax, the "<char>" seems to be understood by prism. another is to remove the quotes in comments: Initial faulty lines:
The following works with prism:
as well as this :
Looks like prism is "lost" by having the multiple single quotes on same line, for some reason. I filled a bug report PrismJS/prism#2255). |
It has (normally) been fixed in prism: |
Not sure if this link is valid, nor if it is on exercism side:
On:
https://exercism.io/my/solutions/7a25d82ea512403280f7fd168040eefb
... colorization is wrong from line 57, likely from column 21, the quote (') char (which is escaped with "") looks like a normal quote, which makes all following code wrong.
The text was updated successfully, but these errors were encountered: