TOML: Fix highlighting of string escape sequences

Review Request #130048 - Created March 25, 2017 and submitted

Information
Nicolás Alvarez
syntax-highlighting
master
5404879...
Reviewers
kate
phils

The rules were using HlCStringChar, which matches on backslash followed by one of abefnrtv"'\ but TOML only supports bfnrt"\ so it would wrongly highlight eg. \a as an escape sequence.

I replaced HlCStringChar with an explicit regex matching only the supported escape sequences, including \uxxxx and \Uxxxxxxxx for Unicode hex chars. I also added a rule to mark any other backslash sequence as an error.

Looked at the HTML result in kate-syntax-highlighter, and editing in Kate (an old version not using this framework).

Nicolás Alvarez
Dominik Haumann
Nicolás Alvarez
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 5d24268482297e1499d411a3c5257ba9bfb6e66b by Dominik Haumann on behalf of Nicolás Alvarez to branch master.
Loading...