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

syntax highlighting does not end comment in #!/bin/sh file #1754

Open
deep-42-thought opened this issue Jan 29, 2018 · 4 comments
Open

syntax highlighting does not end comment in #!/bin/sh file #1754

deep-42-thought opened this issue Jan 29, 2018 · 4 comments

Comments

@deep-42-thought
Copy link

I have a shell script, marked with #!/bin/sh, in which a ' inside a comment confuses geany's syntax parser and makes it believe this comment does not end. The minimal example I can come up with is:

#!/bin/sh
a=$(
  # '
  echo 'Yo'
)
echo 'not a comment!'

Note, that outside of $(...) the use of # ' is treated correctly.
This is with geany 1.32 (built on 2017-11-21 with GTK 2.24.31, GLib 2.54.0) on archlinux.

@elextr
Copy link
Member

elextr commented Feb 2, 2018

The highlighting is performed by the Scintilla editing widget Geany uses which is a separate project. Please report to their bugtracker so you can be directly linked to responses and queries. Please post a link to the bug here for tracking.

@b4n
Copy link
Member

b4n commented Feb 2, 2018

The bug here is actually that # is not recognized inside $(…), and thus that the quote is considered never closed. But yeah should be fixed in Scintilla.

@deep-42-thought
Copy link
Author

ok, done: #1994

@lpaulsen93
Copy link
Contributor

It seems this would also be solved by my changes submitted to Scintilla in https://sourceforge.net/p/scintilla/code/merge-requests/22.

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

No branches or pull requests

4 participants