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

Incorrect highlighting of var-strings #26

Closed
phipsgabler opened this issue Oct 27, 2020 · 5 comments
Closed

Incorrect highlighting of var-strings #26

phipsgabler opened this issue Oct 27, 2020 · 5 comments

Comments

@phipsgabler
Copy link
Contributor

phipsgabler commented Oct 27, 2020

var"#sprint#339"

In this example, only the part r"#sprint#339" is highlighted in red (probably confused with a regex literal). It should cover the whole var, though.

(See JuliaLang/julia#32408.)

@wg030
Copy link
Owner

wg030 commented Oct 27, 2020

Hmm, quite strange that my https://github.com/wg030/jlcode/blob/master/createlists.jl does not recognize this string prefix. I will have to check this out, I guess.
The quickfix is to add the line morestring=[s]{var"}{"},% after line 370.

@phipsgabler
Copy link
Contributor Author

It's a builtin of the parser, not a real string macro. Otherwise expressions like

var" x " = y.var" z "

couldn't work. Also, it's not really a string -- ideally, it should belong to the same class as identifiers.

But thanks for the workaround!

@wg030
Copy link
Owner

wg030 commented Oct 27, 2020

Ok, I see.
But which way would you prefer to display such expressions then? I am little unsure here.
Should they be displayed like strings, i.e. in red, or would it maybe even better to display them as identifiers, i.e. in black?

@phipsgabler
Copy link
Contributor Author

Definitely like identifiers, I'd say.

@wg030
Copy link
Owner

wg030 commented Nov 25, 2020

While updating the package I looked at this issue again.
I decided to go with the solution I already suggested to you because form a sourcecode point of you these expressions are rather strings altough from a programming point of view they are identifiers.

@wg030 wg030 closed this as completed Nov 25, 2020
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

2 participants