CotEditor icon indicating copy to clipboard operation
CotEditor copied to clipboard

Characters after `’` for matrix transpose are highlighted as text in Matlab

Open MasaakiHirai opened this issue 8 years ago • 2 comments

There is following bug on the Matlab ".m" file.

CotEditor can't recognize one single " ' " for the transposed matrix. Therefore nesting for text becomes irregular.

MasaakiHirai avatar Apr 09 '17 00:04 MasaakiHirai

There may a mitigation, by replacing the character syntax recognition with a regex

'(?:[^'\n]|'')*'

which forbids new lines in a character array.

This does not prevent the false detection of the transpose operator ' as a the beginning of a char array but it does limit the damage to a single line instead of potentially the rest of the document.

samschott avatar Jun 17 '20 10:06 samschott

Because I recently received similar issues. I explain again the current state of this issue.


Due to the limitation of the current CotEditor's implementation to extract syntax highlighting, fixing this is hard (maybe impossible).

I know I need to re-design the entire syntax parsing algorithm, but actually, not yet planned due to my limited time resource. Sorry for that. I'll consider again if there is a way to work around it.

1024jp avatar Jul 27 '21 01:07 1024jp