-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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): allow code tags containing inline elements to stay inline #6767
Conversation
const inlineElements = [ | ||
'a', | ||
'b', | ||
'big', | ||
'i', | ||
'span', | ||
'em', | ||
'strong', | ||
'sup', | ||
'sub', | ||
'small', | ||
]; |
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.
Maintaining this list is not ideal, but I doubt if it happens a lot anyways. We haven't heard anyone complaining so far
✔️ [V2] 🔨 Explore the source changes: 02f7d1f 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/6219b767c914b70007cf3043 😎 Browse the preview: https://deploy-preview-6767--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6767--docusaurus-2.netlify.app/ |
Size Change: 0 B Total Size: 789 kB ℹ️ View Unchanged
|
hmmm, we can give this a try 👍 |
Motivation
Noticed this problem on our website:
The
<a>
tag inside<code>
makes the latter be translated toCodeBlock
. However, it's possible to make it stay as<code>
since<a>
is inline.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
The
<code>
works well on https://docusaurus.io/docs/api/themes/configuration#navbar-dropdown. http://localhost:3000/tests/pages/code-block-tests#code doesn't regress either.