GNOME Bugzilla – Bug 789566
Python syntax highlighting doesn't support dashes in \N(name} string literals
Last modified: 2017-10-28 07:29:25 UTC
Created attachment 362420 [details] [review] Proposed patch for this issue The python syntax highlighter correctly recognizes most `\N{name}` escape sequences like `\N{CLOCK FACE ONE OCLOCK}` but it fails to recognize valid names when they contain a dash, like `\N{CLOCK FACE ONE-THIRTY}`. Looking at the spec (https://www.unicode.org/Public/9.0.0/ucd/NamesList.html#FilePrimitives), the name can contain "ASCII letters, digits, space and hyphen" so I suggest changing the regexp from `[A-Z\ ]+` to `0-9[A-Z\ -]+`. Attached is a patch that does just that.
Review of attachment 362420 [details] [review]: Looks good, thanks for the patch. Pushed as commit e6ea71223ec5537f256fd7d15e29d9327696f8d3 on the master branch. And cherry-picked on the gnome-3-24 branch, the fix will be available in 3.24.6.
Thanks! ✨