-
Notifications
You must be signed in to change notification settings - Fork 658
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
WIP - Whitespace lexing after Keywords - collecting issue #1905
Comments
The following command searches the example files for occurrences where spaces following a Keyword class token or a name class token is not marked as Text.Whitespace token
run this in This results in a rather long list (and a little bit of noise)
These must be all cases where I think the trailing spaces could be marked with the more specific Text.Whitespace than being plain Text tokens. |
This project will likely take me a while to finish - extrapolating my currently invested free time: at best a couple of month. If anyone is interested to join in, please do so! |
Some spot checking shows, there are more occurrences of Non-Whitespace token for space characters in lexers than i have in the list in the top. Hence, it might be a good idea to go through all lexers - maybe alphabetically. EDIT |
* Modernize Whitespace token: basic lexer * Modernize Whitespace token: bibtex lexer * Modernize Whitespace token: boa lexer * Modernize Whitespace token: capnproto lexer + new example * Modernize Whitespace token: cddl lexer * Modernize Whitespace token: chapel lexer * Modernize Whitespace token: c_like lexer * Modernize Whitespace token: configs lexer * Modernize Whitespace token: console lexer * Modernize Whitespace token: crystal lexer * Modernize Whitespace token: csound lexer * Modernize Whitespace token: css lexer * Revert a change in basic lexer
* Whitespace token modernization - ambient lexer * Whitespace token modernization - ampl lexer * Whitespace token modernization - apdlexer lexer * Whitespace token modernization - apl lexer * Whitespace token modernization - adl lexer * Whitespace token modernization - arrow lexer * Whitespace token modernization - asm lexer
Hey @jean-abou-samra, I think this issue was unintentionally closed by #2159. |
Oops, you're right, thanks! |
Update: #2025 was merged. |
In a recent PR, it become apparent, that there are a lot of places where the whitespace following a Keyword has been often implemented as the
Text
token. Instead the more specificText.Whitespace
token is more applicable here.This issue shall serve as reference and log for similar issues/PRs.
Since initial tests showed a large number of lexers which can be updated, a more systematic approach is tried with the table below. The table lists all lexers in pygments, the status of work, and related issues and PRs. The status shows whether a quick check shows a need for change, whether Whitespace token are already used (hence nothing needs to be done in these cases), or whether the lexers still needs to be inspected whether there is this issue.
State of the cleanup
The text was updated successfully, but these errors were encountered: