Hi,
I’m working with the MATLAB tmLanguage file, trying to fix a minor bug.
Problem is that strings are wrapped in single-quotes (‘sample string’) but a single single-quote is also used as a transpose operator ( array3 = array1’ + array2’ ). Problem is that the tmLanguage file assumes that a single-quote is ALWAYS starting a new string, even if there is no matching single-quote. I want to change this so that it is only highlighted as a string if there is both an open and close single-quote present. Below is the relevant portion of the tmLanguage file… can someone help suggest a change?
<dict>
<key>begin</key>
<string>'</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.matlab</string>
</dict>
</dict>
<key>end</key>
<string>(')|\n</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.matlab</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.single.matlab</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\.</string>
<key>name</key>
<string>constant.character.escape.matlab</string>
</dict>
</array>
</dict>