Skip to content
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

Fix Firefox code copying (2) #2126

Merged
merged 4 commits into from
Mar 5, 2025

Conversation

wongjn
Copy link
Contributor

@wongjn wongjn commented Mar 4, 2025

Alternative to #2120 that is simpler and (hopefully) without regressions!

Replaces <span> elements for lines with <div> elements, since these seem to copy properly as newlines in Firefox. Though please note the HTML spec technically disallows this 😥.

Fixes #1972
Closes #2120

Copy link

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2025 10:52am

@philipp-spiess
Copy link
Member

@wongjn seems like [!code] blocks are no longer processed (or maybe processed in the wrong order?) now: https://tailwindcss-com-git-fork-wongjn-fix-firefox-f600d6-tailwindlabs.vercel.app/docs/hover-focus-and-other-states#differentiating-nested-groups

@philipp-spiess
Copy link
Member

Okay that was just the custom [!code classes:…] code that needed fixing. I tested this in Firefox/Chrome/Safari now and it seems fine. Happy to give this a spin. Thanks for your awesome help!

@philipp-spiess philipp-spiess merged commit 5a77fe6 into tailwindlabs:main Mar 5, 2025
2 checks passed
@wongjn wongjn deleted the fix-firefox-code-copy-2 branch March 5, 2025 11:19
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.

Docs installation step wrong code format on copy
2 participants