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

Correct syntax highlighting for "import Foo as Bar" #121

Open
fsaad opened this issue Apr 3, 2023 · 0 comments
Open

Correct syntax highlighting for "import Foo as Bar" #121

fsaad opened this issue Apr 3, 2023 · 0 comments

Comments

@fsaad
Copy link

fsaad commented Apr 3, 2023

The as in import Foo as Bar should be highlighted in red. Note that as is not a reserved for in the usual sense, for example, it can itself be a package name or be assigned to a variable.

image

The Github syntax highlighter, which seems to be based on the Julia Atom package handles this case correctly but only in some cases, e.g.,

import Foo as Bar
import Foo, Bar as Zing
import as               # `as` is a package name
import Foo, as          # `as` is a package name
import as as as         # XXX Github renders incorrectly
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

1 participant