Skip to content

Conversation

@a10nik
Copy link

@a10nik a10nik commented Dec 9, 2025

Apparently including regions from TSX like {@includeCode ./examples.tsx#component} was not supported:

[error] @includeCode tag in MyComponent specified "./examples.tsx#component", but regions are not supported for this file extension.

@a10nik
Copy link
Author

a10nik commented Dec 9, 2025

Added jsx, mjs and cjs extensions as well while I'm at it

@a10nik
Copy link
Author

a10nik commented Dec 9, 2025

Tested a bit if vscode supports other region syntaxes inside JSX tags themselves, to see if we should add more regexes for JSX-like extensions. Looks like it doesn't.
image

Noticed another discrepance between vscode and IncludePlugin: IncludePlugin requires the closing comment to also have a regionName while it seems to be ignored in vscode:

image This one is foldable no matter what the closing text is image

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