Skip to content

Conversation

@Hushan-10
Copy link

@Hushan-10 Hushan-10 commented Jan 30, 2026

Summary

Fix Jac syntax highlighting for multi-line self-closing JSX-style tags, and add regression coverage.

Issue

Multi-line self-closing tags (example: <EmailBuddyLayout ... /> split across lines) were not tokenized correctly, causing incorrect scopes and broken highlighting.

image

Fix

Update the Jac TextMate grammar to recognize /> as a valid tag terminator for both component tags and HTML tags, then add tests and a small example to prevent regressions.

image

Changes

  • syntaxes/jac.tmLanguage.json
    • Improved JSX/HTML tag patterns to support self-closing tags (including multi-line forms).
  • src/__tests__/inspectTokenScopes.test.ts
    • Added tests for multi-line self-closing component tag token scopes.
  • examples/app.jac
    • Added a minimal example that uses a multi-line self-closing component tag.

Testing

  • Added/updated unit tests for token scope inspection.

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