Skip to content

Javascript new ES6 identifiers are not handled as suchΒ #24

@jr-grenoble

Description

@jr-grenoble

There are 2 issues related to ES6 identifiers:

  1. In ES6, identifiers are less constrained than in ES5. For instance, you can define a class method named π‘€“κ˜Œ where 𑀓 is the Brahmi letter Ka \u{11013} and ꘌ is the Vai syllable lengthener \u{a60c}.
    Note that you can check that π‘€“κ˜Œ is a valid ES6 identifier. Mathias Bynens from Google has created a script that generates the proper regex for ES6 (and ES5) identifiers.

However, the Sunlight javascript rules for syntax highlighting do not handle such identifiers properly and treat them as punctuation, e.g. d.π‘€“κ˜Œ ( { days: 7 } ); will display with 𑀓 and ꘌ highlighted as sunlight-punctuation.

  1. It also seems that the processing of such characters discards some of them: they appear as οΏ½ in the resulting code. E.g. this is the case for Brahmi letter Ka 𑀓.

It is not a font issue, as Consolas is capable of displaying this letter.

Note that there are other UTF-8 characters that exhibit this second issue, this is only an example.

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