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

Error in syntax highlighting for Syntax Style "ShellScript" #1483

Open
rovf opened this issue May 9, 2023 · 1 comment
Open

Error in syntax highlighting for Syntax Style "ShellScript" #1483

rovf opened this issue May 9, 2023 · 1 comment
Labels
better to fix unwanted behaviors better to fix syntax highlight issues related to syntax highlighting

Comments

@rovf
Copy link

rovf commented May 9, 2023

Description

$# is not highlighted as special variable

To Reproduce

Create a POSIX shell script which contains the following statement:

(( $# > 0 )) && [[ ${@: -1:1} == 1 ]] && echo true

Expected behavior

The three statements are highlighted as statements.
However, the highlighter treats the # in $# > 0 as the start of a comment and
highlights the whole line as comment.

CotEditor version

4.5.4 (566)

macOS version

12.6.5 (Build 21G531)

Additional context

No response

@rovf rovf added the potential bug issues not yet tested label May 9, 2023
@clayton256
Copy link

Something similar is happening with CSS & Javascript code highlighting within a php file. When the CSS code contains a color code such as #f5f5f5, the pound and everything following is highlighted as a comment. Similarly, when the JS code has a DOM reference such as #successmsg, everything after the pound is highlighted as a comment.

@1024jp 1024jp added better to fix unwanted behaviors better to fix syntax highlight issues related to syntax highlighting and removed potential bug issues not yet tested labels Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better to fix unwanted behaviors better to fix syntax highlight issues related to syntax highlighting
Development

No branches or pull requests

3 participants