-
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
Too greedy comment highlighting for bash #1457
Comments
Hi! Thanks for reporting. I think this is a problem with the Would #1443 help there? |
Nope, didn't help. I replaced bash plugin content with the one from prism-bash.js from mentioned PR but highlighting looks exactly the same :( |
I tried to apply a regexp by @Golmote in my PR and it seems to make things better.
with
This should prevent Prism from interpreting the parentheses in your strings as the end of the command substitution, and I think it's a good practice anyway when it comes to scripting as it adds semantics and stuff. Furthermore, even some heavy editors have trouble correctly highlighting complicated command substitutions, whereas functions are generally perfectly fine. By the way, I don't really understand why this issue's title mentions comments since it seems it's the command substitution that is incorrectly parsed. |
Nice work @alice-mm. I can confirm that changes from your current PR fixes my issue. I'll wait for it to get merged. Thanks! |
You're welcome, @Rychu-Pawel. Also,
( |
Resolved by #1443. |
So is this change pushed to NPM? How do I get this change? |
@rmccullagh A new Prism version will be published on npm soon. |
I think there is an issue with comment highliting for bash scripts. Please take a look at example on my page: http://pawelrychlicki.pl/Article/Details/58/zfs-health-check-script-for-monit-09
In my opinion lines 57-59, 74-81, 89-93 and 111-131 shouldn't be green. Script is OK as it executes fine. If I put the script into Prism's test drive it looks the same.
The text was updated successfully, but these errors were encountered: