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

Shell script lexer: Inline comment within inline command substitution affects up to the end of a line, beyond the end of the substitution #2013

Open
Phroneris opened this issue Dec 9, 2023 · 0 comments
Labels
bugfix-request A request for a bugfix to be developed.

Comments

@Phroneris
Copy link

Name of the lexer

Shell

Code sample

ls --all \
   -1 `# One file per line` \
   --group-directories-first

Additional context

The above shell script is identical to ls --all -1 --group-directories-first because the inline comment # ... remains in effect as a comment just until the end of the command substitution `...`.

But, Rouge currently treats the ` \ part at the end of the second line as comment contents too.

@Phroneris Phroneris added the bugfix-request A request for a bugfix to be developed. label Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix-request A request for a bugfix to be developed.
Projects
None yet
Development

No branches or pull requests

1 participant