Skip to content

Support emitting the end of tag name when newline and tab are used #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 29, 2025

Conversation

aaronhuggins
Copy link
Contributor

I encountered an issue with jsxLoader where valid JSX elements with a valid tag name were skipped during compilation. I found that this only happened with nested elements, and only when followed by a newline or tab white space character. These are valid terminators for the tag name, and can easily be added by hand or by prettification of JSX code.

This pull request adds tests and support for these cases.

Tests have been ran locally and confirm both before and after the change to jsxLoader.

BEFORE:
image

AFTER:
image

…a newline or tab

Simple elements compile without issue when the tag name is followed by any white space. Nested elements fail to emit the tag name when they contain newline or tab white space.
@ConradSollitt ConradSollitt merged commit cef28d7 into dataformsjs:master Jul 29, 2025
@ConradSollitt
Copy link
Contributor

Thanks Aaron, I will check the code and publish this to NPM later today or this week.

@aaronhuggins
Copy link
Contributor Author

@ConradSollitt Thanks! I really appreciate it. I hope it was okay not to regenerate the minified files.

@ConradSollitt
Copy link
Contributor

Thanks again Aaron, I just published the new build with minified files and gave you credit on the https://github.com/dataformsjs/dataformsjs/blob/master/CHANGELOG.md

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.

2 participants