GNOME Bugzilla – Bug 317769
SQL Syntax Highlighting Incorrectly Highlights Comments
Last modified: 2005-10-06 05:14:37 UTC
Please describe the problem: When working with .sql scripts, the syntax highlighting feature will interpret other patterns it finds within a comment. Steps to reproduce: Insert a SQL comment into the document with other recognized patterns inside it, such as: -- Don't type this. Actual results: The first part of the comment is correctly grey, but from the apostrophe onward it formats as a string literal with red italics. Expected results: The formatting for a comment should override other patterns inside it. Does this happen every time? Yes. Other information: This is easily fixed. The Comment pattern is almost near the end of the priority list. If you go in to the Preferences for Synatx Highlighting and move it up to the top (I placed it right after Braces), it formats correctly.
Thanks. I made this change to the default SQL highlighting pattern in the 1.0.x branch of CVS.