fix(theme): add more tag names to inline element set (#8190)

This commit is contained in:
Joshua Chen 2022-10-12 12:03:35 -04:00 committed by GitHub
parent 1ca4fb50fe
commit aa7d81d7bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) =>