Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ronisbr opened this issue Aug 30, 2020 · 3 comments
Open

Comments

@ronisbr
Copy link
Contributor

ronisbr commented Aug 30, 2020

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 added a commit to ronisbr/PrettyTables.jl that referenced this issue Aug 30, 2020
This leads to a problem in Emacs due to a bug in julia-emacs:

JuliaEditorSupport/julia-emacs#142
@recri
Copy link
Contributor

recri commented Sep 2, 2020

Same thing, after this line:

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

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

@non-Jedi
Copy link
Contributor

non-Jedi commented Sep 2, 2020

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.

@recri recri mentioned this issue Sep 8, 2020
@recri
Copy link
Contributor

recri commented Sep 8, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants