Issue with Sourcecode with the language="SQL" switch
-
Sourcecode with the language=”SQL” switch seems to not be properly displaying colors….at least on a new blog post. Most of the code is colored properly, but about 2/3rd of the way down, everything changes to blue and stays that way. Here is an example: http://victoriayudin.com/2013/10/15/sql-view-for-dynamics-gp-sales-quantities-and-amounts-by-item-by-site-by-month/.
The same code in an older blog post looks correct: http://victoriayudin.com/2011/08/29/sql-view-for-sales-by-item-by-month/.
The blog I need help with is: (visible only to logged in users)
-
Hi there,
Thanks for letting us know about this issue! I took a look at the code you posted, and I identified what’s causing the problem.
The single quotation mark in line 13 (“UofM’s”) is confusing the code highlighter. Even though that is being correctly highlighted as commented-out code, it’s creating the problem farther down with the blue-highlighted code.
I reported this to our team to see if we can fix this issue. In the meantime, if you remove the single quotation mark in line 13 that should fix the highlighting in the rest of the code. Thanks again for reporting this, and please let me know if I can help with anything else. :)
-
Hi rachelmcr,
Yep, removing the single quote on line 13 fixed it. While it would be nice to use single quotes in the commented out code, that’s not a deal breaker typically, so this will work for now. I just need to remember it. :-)
Thank you very much!
-Victoria -
Hi Victoria,
I checked with our team, and we found a way around this issue if you want to include single quotes in the commented out code. If you’d like, you can escape the quotes using html entities. For a single quotation mark, you can use this html instead (without the spaces between each character):
& r s q u o ;The sourcecode shortcode here at WordPress.com is based on Alex Gorbatchev’s SyntaxHighlighter. If you’re interested in getting this issue fixed completely, so you can use single quotation marks instead of escaped characters, I recommend reporting this issue here for further investigation:
https://github.com/alexgorbatchev/SyntaxHighlighter/issues
Please let me know if I can help with anything else! :)
- The topic ‘Issue with Sourcecode with the language="SQL" switch’ is closed to new replies.