-
Notifications
You must be signed in to change notification settings - Fork 59
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
feat(tsx): Extract script and styles from TSX for language-server consumption #1019
Merged
Merged
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
fbfd3e1
feat(tsx): Extract script and styles from TSX for language-server con…
Princesseuh 23c274a
feat: add options for styles
Princesseuh 5849805
fix: reverse order of operation
Princesseuh aac06fe
test: fix
Princesseuh a4c973b
test: add tests
Princesseuh 71636d1
Merge branch 'main' into fix/tsx-extract-scripts
Princesseuh d5ffa2c
fix: count printed bytes so that we can skip over them later
Princesseuh c9c1ea4
chore: fix format
Princesseuh aa1403c
chore: uugh
Princesseuh a4b3b27
chore: biome what is GOING on
Princesseuh 1bdb488
fix(tsx): rework how escaping work (#1023)
Princesseuh 8d74c21
Merge branch 'main' into fix/tsx-extract-scripts
Princesseuh daeb4c1
nit: formatting
Princesseuh 1c24db1
chore: changeset
Princesseuh bc2e8b2
fix: also do it for escaped text
Princesseuh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this not really optimal, because it confuse the printed bytes with the source bytes. It's fine in 99.999% of cases, because we're not printing any multi-bytes ourselves that were not part of the source. But it's something we could do and would have to take into account then. (and is trivial to do, but still)
The real fix, but it'd require a large amount of work would be to have this information directly on the tokens / nodes. I first tried to do that, but I quickly realised that I was changing everything and ran into the risk of breaking things everywhere.
If this prove to be an issue, I'd definitely be willing to make the proper change, but in my testing this honestly proved to work just fine.