StackExchange.DataExplorer
StackExchange.DataExplorer copied to clipboard
fixes the TSQL string escape parsing inside codemirror sql.js
a ' doesn't escape a ' in a T-SQL string, a double quote does. So the codemirror highlighting needs to honor that.
This fixes https://meta.stackexchange.com/questions/350640/backslash-before-single-quote-breaks-syntax-highlighting-the-quote-is-not-escap
Is this fixed in a newer CodeMirror release by chance? This is the the thing of thing we should upstream lest is be nuked by an update.
This is a custom highlighter that does some SEDE-specific stuff on top of TSQL, but there might be a better way of doing it now that would allow taking upstream improvements too?
I checked the current version of that function which I believe is found here: https://github.com/codemirror/CodeMirror/blob/3bf49684d4c62965c1257421c2fe8593f7660d59/mode/sql/sql.js#L133 and that won't fix that bug. Inspecting the codemirror.next doesn't tell me if this gets fixed but I would need to grab these bits and then test to verify.