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(theme-classic): make React elements in pre render correctly #6177

Merged
merged 6 commits into from
Dec 25, 2021

Conversation

Josh-Cena
Copy link
Collaborator

@Josh-Cena Josh-Cena commented Dec 23, 2021

Motivation

Fix #6156. It seems the solution in #3749 was not good enough since it doesn't take React elements into account; this is further traced back to #1584 where Endi decided to unwrap the pre when the children is a React element. However that would not be the user's intention, because GitHub treats <pre> as code blocks:

hey

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

https://deploy-preview-6177--docusaurus-2.netlify.app/tests/pages/code-block-tests

Before After
image image

@Josh-Cena Josh-Cena added the pr: bug fix This PR fixes a bug in a past release. label Dec 23, 2021
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 23, 2021
@netlify
Copy link

netlify bot commented Dec 23, 2021

✔️ [V2]

🔨 Explore the source changes: cf373d1

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61c5d740a94c4b0009a9bd3b

😎 Browse the preview: https://deploy-preview-6177--docusaurus-2.netlify.app

@Josh-Cena Josh-Cena marked this pull request as draft December 23, 2021 15:10
@github-actions
Copy link

github-actions bot commented Dec 23, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 81
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-6177--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Dec 23, 2021

Size Change: +359 B (0%)

Total Size: 662 kB

Filename Size Change
website/build/assets/css/styles.********.css 102 kB +35 B (0%)
website/build/assets/js/main.********.js 490 kB +324 B (0%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 40.1 kB
website/build/index.html 29.6 kB

compressed-size-action

@Josh-Cena Josh-Cena marked this pull request as ready for review December 24, 2021 01:29
@Josh-Cena Josh-Cena added the status: awaiting review This PR is ready for review, will be merged after maintainers' approval label Dec 24, 2021
@Josh-Cena Josh-Cena merged commit 3889e89 into main Dec 25, 2021
@Josh-Cena Josh-Cena deleted the jc/fix-pre branch December 25, 2021 07:27
@Josh-Cena Josh-Cena removed the status: awaiting review This PR is ready for review, will be merged after maintainers' approval label Dec 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<strong> Tag Doesn't Shows Properly in <pre> Block
3 participants