mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 02:12: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 {
|
||||
const inlineElements: (string | undefined)[] = [
|
||||
'a',
|
||||
'abbr',
|
||||
'b',
|
||||
'big',
|
||||
'i',
|
||||
'span',
|
||||
'br',
|
||||
'button',
|
||||
'cite',
|
||||
'code',
|
||||
'del',
|
||||
'dfn',
|
||||
'em',
|
||||
'strong',
|
||||
'sup',
|
||||
'sub',
|
||||
'i',
|
||||
'img',
|
||||
'input',
|
||||
'ins',
|
||||
'kbd',
|
||||
'label',
|
||||
'object',
|
||||
'output',
|
||||
'q',
|
||||
'ruby',
|
||||
's',
|
||||
'small',
|
||||
'span',
|
||||
'strong',
|
||||
'sub',
|
||||
'sup',
|
||||
'time',
|
||||
'u',
|
||||
'var',
|
||||
'wbr',
|
||||
];
|
||||
const shouldBeInline = React.Children.toArray(props.children).every(
|
||||
(el) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue