Skip to content

scheme.py: wrong match of ASCII digits #166

@locsite

Description

@locsite

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.

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