-
-
Notifications
You must be signed in to change notification settings - Fork 161
fix: copy the correct code block #1406
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
Conversation
@wyMinLwin is attempting to deploy a commit to the Svelte Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I just rechecked and my latest commit ignored the bash command. |
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.
Nice find! It was previously selecting the JS block and the last code element which was the code inside the TypeScript hover tooltip. We could try using >
in the selector so it doesn't grab code blocks in tooltips in the future but the current solution works great already.
fixes #1403
Changes
/packages/site-kit/src/lib/components/Text.svelte
Problem
This issue is due to selecting wrong targeted element.
Solution
I changed query for selecting document.
Impact
The change improves the logic for selecting code blocks based on the language toggle by explicitly filtering for the
ts
orjs
language instead of relying on positional selectors.