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

After a backslash, the # character should not begin a comment #68

Open
lkashef opened this issue Dec 3, 2019 · 3 comments
Open

After a backslash, the # character should not begin a comment #68

lkashef opened this issue Dec 3, 2019 · 3 comments
Labels

Comments

@lkashef
Copy link

lkashef commented Dec 3, 2019

The problem

Everything after # on line 5 is highlighted as a comment, while it should not be allowed.

sudo dnf remove -y \
krdc \
kmail \
kgpg \
krusader \ # the old kde twinstyle file manager
kruler

Example from atom/language-shellscript#150

The Solution

  • We could either highlight this comment as an error to warn the user that this is not allowed.
  • The quick solution would be not to scope what's after the # is a comment, thus not misleading the user and also not breaking the highlighting after the comment, since line 6 is considered a separate function call, rather than part of the sudo command.
@issue-label-bot issue-label-bot bot added the bug label Dec 3, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.75. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@maxbrunsfeld
Copy link
Contributor

Simpler runnable example:

$ echo \ # hi

Prints:

# hi

@maxbrunsfeld maxbrunsfeld changed the title In-line comments should not be allowed or tokenized After a backslash, the # character should not begin a comment Dec 3, 2019
dinkumoil referenced this issue in Alexey-T/CudaText Dec 3, 2019
@ahlinc
Copy link
Contributor

ahlinc commented Aug 27, 2023

Current situation (just for clarity):
image

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

No branches or pull requests

3 participants