-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before Volar, the ESM, JSX, and markdown parts of virtual files had to map character by character, with parts shadowed by whitespace characters. This was still how virtual files were built. However, because of how Volar mappings work, this is unnecessary. This change overhauls how virtual files are generated. This leads to more flexibility of virtual files, meaning we can omit or inject content. This is already leveraged in several ways: - Markdown nodes in MDX are represented by TypeScript fragments. This provides compatibility with JSX elements that require children on a type level. - Markdown text nodes in MDX are represented by TypeScript JSX expressions containing an empty string. - JavaScript chunks are represented in the virtual markdown files as HTML comments.
- Loading branch information
1 parent
a738090
commit 7c00fc3
Showing
7 changed files
with
454 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.