- edited description
wrong bash code highlighting (example inside)
Here is the bash code issue example:
for dbf in prefix-db_* ; do gunzip -c $dbf | mysql -uxxx $(basename ${dbf#prefix-} .sql.gz) ; done
The result that happen in JIRA with the code above (using {code:bash}) is close to what http://markup.su/highlighter/ provides with auto-detection. (to Ruby...?)
Select 'Bash' in the dropdown to see what we should actually get.
Thanks !
Comments (8)
-
reporter -
repo owner Thank's for reporting! Could you be a bit more specific in what is not properly highlighted and also attach a screenshot?
-
reporter Hi Holger,
I've attached two screenshots :
1) the {code:bash} result in JIRA
2) the result with the online tool I mentioned above (bash selected of course), which is the one I expect
In JIRA the '#' char in '${dbf#....' shouldn't break the syntax highlighting like this.
And as an indication I am specifying that the same "break" issue happen while selecting Ruby in the online tool
-
repo owner is currently treated as start of comment. So, there are situations where # doesn't mean starting of comment? (I am not a bash expert...) See here for the approach currently in place also in JIRA Syntax Highlighter. http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/bash.html
-
reporter Hi, In the context of a variable used like ${} , # should not be treated as a comment (http://tldp.org/LDP/abs/html/parameter-substitution.html) So if you are sure that {code:bash} call that bash brush so for me there is a bug in SyntaxHighligher. In that case I could open an issue from the corresponding GitHub project :) (The second screenshot in my previous comment is the expected highlight.)
-
reporter (Also I am pretty surprised that we can't test the brush directly online from http://alexgorbatchev.com/SyntaxHighlighter. The website provide examples with no way to test from our own)
-
reporter So I've opened this issue at SyntaxHighligher GitHub issue tracker
-
repo owner - removed milestone
- Log in to comment