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