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

Whitespace token modernization - a* lexers - regarding #1905 #1914

Merged
merged 7 commits into from
Oct 23, 2021

Conversation

blu-base
Copy link
Contributor

This PR is chunk of the effort (#1905) to insert the Whitespace token where ever it applies.

The automation lexer also contains a minor fix for multiline comments (making the multiline-comment-content regex greedy).

tests/examplefiles/ahk/demo.ahk.output Outdated Show resolved Hide resolved
pygments/lexers/automation.py Outdated Show resolved Hide resolved
@blu-base
Copy link
Contributor Author

Further playing with the automation lexer wasn't very fruitful...
Having a brief look into the ahk tutorial shows, there is a feature to label hotkey functions and setting options: https://www.autohotkey.com/docs/Hotstrings.htm

I tried to get detect the labels correctly for the following snippet.

#p::
Run, https://www.pygments.org/
return

^t::
Run, calc.exe
return

:*:pyg::pyg
::pygmentize::pygmentize

This snippet results in differing tokens as well. :*:pyg:: and ::pygmentize:: are so called hotstrings (labels for a hotkey sequence), but one receives the plain Name token and the other Name.Label.


Anyhow, I am unable to find a quick solution. Rethinking this lexer would require some time... I'd drop the respective commit stashing it for later. Maybe I have a better understanding on pygments' code then - or someone else will address this...

@Anteru
Copy link
Collaborator

Anteru commented Oct 18, 2021

Sounds like a plan. I'd rather have this noted as an open issue than introduce this kind of change during a cleanup -- thanks for investigating this!

@Anteru Anteru merged commit 907df2c into pygments:master Oct 23, 2021
@Anteru
Copy link
Collaborator

Anteru commented Oct 23, 2021

Merged, thanks a lot!

@Anteru Anteru added this to the 2.11.0 milestone Oct 23, 2021
@Anteru Anteru added the A-lexing area: changes to individual lexers label Oct 23, 2021
@Anteru Anteru self-assigned this Oct 23, 2021
@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label Oct 23, 2021
@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lexing area: changes to individual lexers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants