julia-emacs icon indicating copy to clipboard operation
julia-emacs copied to clipboard

Wrong highlighting and indentation after a char that is an escaped quote

Open ronisbr opened this issue 4 years ago • 3 comments

Hi!

If we have a char that is a quote ', then the highlight and indentation is not correct:

Captura de Tela 2020-08-29 às 22 13 09

ronisbr avatar Aug 30 '20 01:08 ronisbr

Same thing, after this line:

            elseif c in ('\'', '\"', '\`')

entire rest of source file is rendered as part of a string.

recri avatar Sep 02 '20 12:09 recri

Don't know when I'll get to this but if someone else wants to take a shot at fixing, the rough outline of the solution is:

  1. Give ' string delimiter syntax by default instead of operator (so that the logic for detecting whether \\ has escape syntax or operator syntax in julia-syntax-propertize-function works for it).
  2. Instead of detecting that ' is the start of a string with julia-char-regex, detect when it's an operator.

non-Jedi avatar Sep 02 '20 14:09 non-Jedi

Opened a pull request that appears to fix this. julia-char-regex looked very obscure, but it was only wrong. Syntax table is unchanged.

recri avatar Sep 08 '20 01:09 recri