Skip to content

Unicode characters (Greek letters) in identifiers are handled incorrectly #5

@Socob

Description

@Socob

As far as I can tell, Unicode characters such as Greek letters are treated just like ordinary Latin letters by Mathematica. For example, a file test.m like

varλ1a = 111;
Print[varλ1a^2];

simply prints 12321. However, running pygmentize -l mathematica test.m underlines and colors the λ and also colors the 1 in the variable name varλ1a. As you can see above, the syntax highlighting here on GitHub has the same issue.

This seems wrong to me – in the example, varλ1a is simply a variable holding the value 111. As such, the whole name should be highlighted consistently as a variable name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions