Skip to content

Fix JSX EOF tag callback crash#5

Open
SebTardif wants to merge 1 commit into
reqable:mainfrom
SebTardif:fix/jsx-eof-rangeerror
Open

Fix JSX EOF tag callback crash#5
SebTardif wants to merge 1 commit into
reqable:mainfrom
SebTardif:fix/jsx-eof-rangeerror

Conversation

@SebTardif
Copy link
Copy Markdown

Summary

  • fix the JSX opening-tag callback so incomplete tags at end of input do not throw a RangeError
  • add a regression test that exercises a real JSX context with const x = <Foo in JavaScript and TypeScript
  • keep the fix scoped to the shared callback used by both grammars

Verification

  • /home/sebtardif/flutter/bin/flutter test test/api/highlight_test.dart
  • demonstrated the new regression test fails against the pre-fix callback implementation

Bug appears to originate from commit c8288a4 (first commit, 2024-02-03).

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
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