Skip to content

Fix syntax highlight#12

Open
ryokaji wants to merge 3 commits intomark-when:mainfrom
ryokaji:fix/syntax_highlight
Open

Fix syntax highlight#12
ryokaji wants to merge 3 commits intomark-when:mainfrom
ryokaji:fix/syntax_highlight

Conversation

@ryokaji
Copy link

@ryokaji ryokaji commented Mar 12, 2026

Issue

The v1.4.4 (f4e2e63) falils syntax highlighting.
The reason is ParseResult has updated by updating the parser, so the following doesn't work anymore.

const markwhen = await parse(document.getText());
// markwhen doesn't have `timelines` property in the latest commit
markwhen.timelines.forEach((timeline: any) => {
  timeline.ranges.forEach((range: any) => {
    // ...
  }
});

How to reproduce

  1. clone the repo
  2. npm install && npm run build
  3. launch extension via vscode

What I changed

The following have been made to allow type errors to be detected in the future if interfaces become incompatible:

  • Specified that the parsing result is ParseResult
  • RangeType is referred from the parser package

Result

before:

after:

@ryokaji ryokaji mentioned this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant