CotEditor
CotEditor copied to clipboard
Error in syntax highlighting for Syntax Style "ShellScript"
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
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.