mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-08 13:52:36 +02:00
fix(theme): add more tag names to inline element set (#8190)
This commit is contained in:
parent
1ca4fb50fe
commit
aa7d81d7bf
1 changed files with 26 additions and 6 deletions
|
@ -13,15 +13,35 @@ import type {Props} from '@theme/MDXComponents/Code';
|
||||||
export default function MDXCode(props: Props): JSX.Element {
|
export default function MDXCode(props: Props): JSX.Element {
|
||||||
const inlineElements: (string | undefined)[] = [
|
const inlineElements: (string | undefined)[] = [
|
||||||
'a',
|
'a',
|
||||||
|
'abbr',
|
||||||
'b',
|
'b',
|
||||||
'big',
|
'br',
|
||||||
'i',
|
'button',
|
||||||
'span',
|
'cite',
|
||||||
|
'code',
|
||||||
|
'del',
|
||||||
|
'dfn',
|
||||||
'em',
|
'em',
|
||||||
'strong',
|
'i',
|
||||||
'sup',
|
'img',
|
||||||
'sub',
|
'input',
|
||||||
|
'ins',
|
||||||
|
'kbd',
|
||||||
|
'label',
|
||||||
|
'object',
|
||||||
|
'output',
|
||||||
|
'q',
|
||||||
|
'ruby',
|
||||||
|
's',
|
||||||
'small',
|
'small',
|
||||||
|
'span',
|
||||||
|
'strong',
|
||||||
|
'sub',
|
||||||
|
'sup',
|
||||||
|
'time',
|
||||||
|
'u',
|
||||||
|
'var',
|
||||||
|
'wbr',
|
||||||
];
|
];
|
||||||
const shouldBeInline = React.Children.toArray(props.children).every(
|
const shouldBeInline = React.Children.toArray(props.children).every(
|
||||||
(el) =>
|
(el) =>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue