Skip to content

WIP - Whitespace lexing after Keywords - collecting issue #1905

@blu-base

Description

@blu-base

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 specific Text.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

Lexer Status PRs and issues
actionscript ✔️ merged #1911
agile ✅ nothing to do
algebra ✅ nothing to do
ambient ✔️ merged #1914
amdgpu ✅ nothing to do
ampl ✔️ merged #1914
apdlexer ✔️ merged #1914
apl ✔️ merged #1914
archetype ✔️ merged #1914
arrow ✔️ merged #1914
asc ✅ nothing to do
asm ✔️ merged #1914
automation 🚩 more elaborate change necessary
bare ✔️ merged #1911
basic ✔️ merged #1923
bibtex ✔️ merged #1923
boa ✔️ merged #1923
business ✔️ merged ➰ needs refactor #1911
capnproto ✔️ merged #1923
c_cpp ✔️ merged #1237(#1904)
cddl ✔️ merged #1923
chapel ✔️ merged #1923
clean ✅ nothing to do
c_like ✔️ merged #1923
compiled ✅ nothing to do
configs ✔️ merged #1923
console ✔️ merged #1923
crystal ✔️ merged #1923
csound ✔️ merged #1923
css ✔️ merged #1923
dalvik ✔️ merged #1939
data ✔️ merged #1939
devicetree ✔️ merged #1939
diff ✔️ merged #1939, #1911
dotnet ✔️ merged #1939
d ✔️ merged #1939
dsls ✔️ merged #1939
dylan ✔️ merged #1939
ecl ✔️ merged #1957
eiffel ✔️ merged #1957
elm ✔️ merged #1957
email ✅ nothing to do
erlang ✔️ merged #1957
esoteric ✔️ merged #1957
ezhil ✔️ merged #1957
factor ✔️ merged #1957
fantom ✔️ merged #1957
felix ✔️ merged #1957
floscript ✔️ merged #1957
forth ✔️ merged #1957
fortran ✅ nothing to do
foxpro 🚩 needs change, major refactor for reserved Keywords
freefem ✅ nothing to do
functional ✅ nothing to do
futhark ✔️ merged #1957
gcodelexer ✅ nothing to do
gdscript ✔️ merged #1978
go ✔️ merged #1978
grammar_notation ✔️ merged 🚩 needs refactor (multiline comment, floats,...) #1978
graphics ✔️ merged #1978
graph ✔️ merged #1978
graphviz ✅ nothing to do
gsql.py ✅ nothing to do
haskell ✔️ merged #1978
haxe ✔️ merged #1978
hdl ✔️ merged #1978
hexdump ✔️ merged #1978
html ➰ in review #2012
idl ✔️ merged #2025
igor ✔️ merged #2025
inferno ✔️ merged #2025
installers ✔️ merged #2025
int_fiction ✔️ merged #2025
iolang ✔️ merged #2025
javascript ✔️ merged #2025
j ✔️ merged #2025
jslt ✅ nothing to do
julia ✔️ merged #2025
jvm ✔️ merged #2025
kuin ✔️ merged #2025
lisp ✔️ merged #2025
make ✔️ merged , 🚩 needs more change, missed some spaces #1911
markup 🚩 needs change
math ✅ nothing to do
matlab 🚩 needs change
maxima ✅ nothing to do
meson ✅ nothing to do
mime ❔ looks good, but check again later
ml 🚩 needs change
modeling 🚩 needs change
modula2 🚩 needs change
monte ✅ nothing to do
mosel 🚩 needs change
ncl 🚩 needs change
nimrod 🚩 needs change
nit 🚩 needs change
nix 🚩 needs change
oberon 🚩 needs change
objective 🚩 needs change
ooc 🚩 needs change
other ✅ nothing to do
parasail 🚩 needs change
parsers 🚩 needs change
pascal 🚩 needs change
pawn 🚩 needs change
perl 🚩 needs change
php 🚩 needs change
pointless 🚩 needs change
pony 🚩 needs change
praat 🚩 needs change
procfile ✅ nothing to do
prolog 🚩 needs change
promql ✅ nothing to do
python 🚩 needs change
qvt 🚩 needs change
rdf 🚩 needs change
rebol 🚩 needs change
resource 🚩 needs change
ride 🚩 needs change
rnc 🚩 needs change
roboconf 🚩 needs change
robotframework 🚩 needs change, seems more work
r 🚩 needs change
ruby ✔️ c1fe7bb
rust 🚩 needs change
sas 🚩 needs change
scdoc 🚩 needs change
scripting 🚩 needs change
sgf ✅ nothing to do
shell 🚩 needs change 2f78a7b
sieve 🚩 needs change
slash ✅ nothing to do
smalltalk 🚩 needs change
smithy 🚩 needs change
smv ✅ nothing to do
snobol 🚩 needs change
solidity ✅ nothing to do
special ✅ nothing to do
sql ✔️ merged, 🚩 needs more change #1908
srcinfo ✅ nothing to do
stata 🚩 needs change
supercollider 🚩 needs change
tcl 🚩 needs change
teal 🚩 needs change
templates 🚩 needs change
teraterm 🚩 needs change
testing 🚩 needs change
textedit 🚩 needs change
textfmts 🚩 needs change
text ✅ nothing to do
theorem 🚩 needs change
thingsdb 🚩 needs change
tnt 🚩 needs change
trafficscript 🚩 needs change
typoscript 🚩 needs change
unicon 🚩 needs change
urbi 🚩 needs change
usd ✅ nothing to do
varnish 🚩 needs change
verification 🚩 needs change
webassembly 🚩 needs change
webidl 🚩 needs change
webmisc 🚩 needs change
web ✅ nothing to do
whiley 🚩 needs change
x10 🚩 needs change
xorg 🚩 needs change
yang ✅ nothing to do
zig ✅ nothing to do

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions