microsoft / microsoft/vscode-textmate
JSON grammar without `filePath` parsed incorrectly as PList
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 678
- Forks
- 135
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 2
Description
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:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test/api/tokenInformation.test.ts and the failing getScopeRangeAtPosition() path in src/api.ts, then compare the JSON handling described in the linked parseRawGrammar.ts reference. Confirm that JSON grammar content without a filePath is parsed correctly and that the token information test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100