vprimachenko / Sublime-Colorcoder

Semantic highlight for Sublime Text
290 stars 25 forks source link

Python highlighting doesn't respect escaped single-quotes in single-quote string. #62

Open mwchase opened 8 years ago

mwchase commented 8 years ago

When I have a string like 'It\'s a beautiful day!', the entire string should get the string highlighting. Instead, it considers everything after the \' as not a string, and therefore normal highlighting, until it gets to the closing ', at which point it thinks the non-string characters after it are a string.

irdial commented 6 years ago

Confirmed with PHP:

$test = preg_match('/PARAMOUNT/', $elements, $matches, PREG_OFFSET_CAPTURE);

$elements and $matches are not coloured correctly; caused by the /'.