GNOME Bugzilla – Bug 326887
UTF-8 characters mess up fancy colouring
Last modified: 2006-01-18 09:55:55 UTC
Please describe the problem: By default, class names (.some_class) in CSS files are reddish and in italics. If one of them contains UTF-8 characters, and probably other non-ASCHII characters although I haven't checked that, they will be black and upright from that character onward. I wouldn't be surprised if this is a problem with identifiers (#some_identifier) too, or with other formats than CSS, but I haven't checked it. Steps to reproduce: 1. Create a CSS file with UTF-8 characters in class names 2. Save it with the .css extention or change the document type to stylesheet 3. Look at the class names with UTF-8 characters Actual results: You will see the part of the class name from the UTF-8 character until the end of the name in black, upright style (with default settigngs, anyway) Expected results: It might be expected that the whole name should look the same. Does this happen every time? Yes. Other information: Here is a real-life CSS file that uses them: http://www.mf.lu.se/mf.css
Confirmed. The reason is the search pattern, which is actually: '[#.][a-z0-9\-_]+' To also consider UTF-8 characters, we need to change this pattern to something like: '[#.][^ ,{<>/]+'. That solves the problem. Or did I miss a character, which could end an identifier, or a valid part of an identifier?
Hmm, looks alright. However, I've only tested it with a few different CSS files. Doesn't appear to break anything else so far.
Ok. I also did not observe any problems. So I commited the pattern fix. Closing this bug now.