Skip to content

JSON grammar without filePath parsed incorrectly as PList #214

@zm-cttae

Description

@zm-cttae
  2) test/api/tokenInformation.test.ts (src/api.ts)
       getScopeRangeAtPosition(): Promise<TextmateToken>:
     Error: Near offset 1: expected < ~~~"name":"Plain Text","scopeName":"text","patterns":~~~

This is happening because JSON support is hacked in for JSON file URIs, but not JSON content values:

if (filePath !== null && /\.json$/.test(filePath)) {
return parseJSONGrammar(content, filePath);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions