-
Notifications
You must be signed in to change notification settings - Fork 59
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
Bash: "different styles between \r and \n" after comments and heredoc delims #57
Comments
It will help to include bash in testing and also to make the lexer consistent with different line ends. Lexilla includes .sh files so |
Committed the change with example files using .bsh extension. It could be argued that |
Included in 5.1.5 release. |
LexBash
may switch styles before complete EOL termination in files with CRLF line endings.This affects
SCE_SH_COMMENTLINE
:as well as
SCE_SH_HERE_Q
:All cases can be traced to how the value of
StyleContext::atLineEnd
1 is determined, with CRLFs apparently giving a result like this:<false>CR<true>LF
.Since DOS EOLs would only corrupt a genuine shell script, the problem (if any) is strictly limited to prospective lexer tests for Bash (*), currently absent from the source tree.
Simply not testing
LexBash
would be the quickest solution; in which case the enclosed patch set can be ignored.LexBash-Prefer-MatchLineEnd-to-atLineEnd.zip
(*) The proposed
x.sh
currently generates these (non-fatal) warnings:As this would add the first ever Bash lexing test, an effort was made to demonstrate a full suite of lexical styles, along with those affected by the topic issue; hence the nondescript file name.
Footnotes
https://github.com/ScintillaOrg/lexilla/blob/a35a59845e793d9d37d249cf097e71fecc5f4bcd/lexlib/StyleContext.h#L35-L40 ↩
The text was updated successfully, but these errors were encountered: