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(code block): use <div> for Firefox code block line breaks #1885

Merged
merged 1 commit into from
Feb 7, 2023
Merged

fix(code block): use <div> for Firefox code block line breaks #1885

merged 1 commit into from
Feb 7, 2023

Conversation

nobkd
Copy link
Contributor

@nobkd nobkd commented Feb 4, 2023

πŸ”— Linked issue

#1883

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Using divs for highlighted code blocks (instead of spans) to preserve line breaks when copying selection in Firefox.
Inline codes aren't affected, because those only use the children of the first "line" as content.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codesandbox
Copy link

codesandbox bot commented Feb 4, 2023

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify
Copy link

netlify bot commented Feb 4, 2023

βœ… Deploy Preview for nuxt-content ready!

Name Link
πŸ”¨ Latest commit
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt-content/deploys/63e27828c27ee70687636114
😎 Deploy Preview https://deploy-preview-1885--nuxt-content.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@nobkd nobkd marked this pull request as ready for review February 5, 2023 00:06
@nobkd nobkd changed the title fix(highlight): use <br> for code block line breaks fix(code block): use <div> for code block line breaks Feb 5, 2023
@nobkd nobkd changed the title fix(code block): use <div> for code block line breaks fix(code block): use <div> for Firefox code block line breaks Feb 5, 2023
Copy link
Member

@farnabaz farnabaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@farnabaz farnabaz merged commit 246bad9 into nuxt:main Feb 7, 2023
@nobkd nobkd deleted the fix-highlight/firefox-line-breaks branch February 7, 2023 16:22
@farnabaz farnabaz mentioned this pull request Mar 8, 2023
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