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

scheme.py: wrong match of ASCII digits #166

Open
locsite opened this issue Jan 11, 2024 · 0 comments
Open

scheme.py: wrong match of ASCII digits #166

locsite opened this issue Jan 11, 2024 · 0 comments

Comments

@locsite
Copy link

locsite commented Jan 11, 2024

In all regular expressions defined by lex/scheme.py, the sequence "\d" is erroneously used for matching an ASCII digit. By default, in Python 3 that sequence matches too much: all Unicode digits. For example, it matches the full-width digit "4" (U+FF14), which is not a legal ASCII digit, as required by the lilypond syntax.

This generates wrong colorization patterns in "Frescobaldi" when a source file contains Unicode digits outside the ASCII set.

The "\d" sequence should be replaced with the safer "[0-9]" sequence in all regular expressions where an ASCII digit is intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant