Closed uvtc closed 5 years ago
Ah, "trailing comments" was the phrase I was looking for.
This patch to bash.xml seems to do the trick. I don't know if it has any other side effects, though. It would be good to test Kate to see if it has this bug, or if there's an issue in skylighting itself.
diff --git a/skylighting-core/xml/bash.xml b/skylighting-core/xml/bash.xml
index cdfdf95..d83d718 100644
--- a/skylighting-core/xml/bash.xml
+++ b/skylighting-core/xml/bash.xml
@@ -482,7 +482,7 @@
<!-- FindComments consumes shell comments till EOL -->
<context attribute="Normal Text" lineEndContext="#pop" name="FindComments">
<DetectChar attribute="Comment" context="Comment" char="#" firstNonSpace="true"/>
- <RegExpr attribute="Normal Text" context="Comment" String="[\s;](?=#)" />
+ <RegExpr attribute="Normal Text" context="Comment" String="\s*[\s;](?=#)" />
</context>
<context attribute="Comment" lineEndContext="#pop" name="Comment">
<IncludeRules context="##Alerts" />
Was this change ever made to skylighting? I just noticed that I still have the same issue (using the stock Pandoc that comes with Debian Testing, v2.9.2.1).
This particularly causes a problem when the trailing comment has an apostrophe in it, which when not in a comment looks like a hard quote to the syntax highlighter.
The version of pandoc in debian testing is very old. Try installing our own debian package from jgm/pandoc Releases.
Ah. Wonderful. Using 2.14.0.3 now. Easy to install the deb. Works perfectly now. Thanks so much.
Using:
bash syntax highlighting works for