1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-08-17 00:30:26 +03:00

Fix escaping in the scheme.kak highlighter awk script

The awk-generated highlighters in scheme.kak need '\\.' to obtain '\.'
in the generated kakscript output. Fix the inf/nan rule (which should
generate '(?:inf|nan)\.0') to read '(?:inf|nan)\\.0' in the awk.
This commit is contained in:
Chris Webb 2023-12-13 17:12:59 +00:00
parent 83fb65aef5
commit 51dab20aef

View File

@ -162,7 +162,7 @@ evaluate-commands %sh{ exec awk -f - <<'EOF'
# unprefixed decimals
add_highlighter("(?<![" normal_identifiers "])(\\d+(\\.\\d*)?|\\.\\d+)(?:[esfdlESFDL][-+]?\\d+)?(?![" normal_identifiers "])", "0:value");
# inf and nan
add_highlighter("(?<![" normal_identifiers "])[+-](?:inf|nan)\.0(?![" normal_identifiers "])", "0:value");
add_highlighter("(?<![" normal_identifiers "])[+-](?:inf|nan)\\.0(?![" normal_identifiers "])", "0:value");
}
EOF
}