Skip to content

Commit aa7d81d

Browse files
authored
fix(theme): add more tag names to inline element set (#8190)
1 parent 1ca4fb5 commit aa7d81d

File tree

1 file changed

+24
-4
lines changed
  • packages/docusaurus-theme-classic/src/theme/MDXComponents

1 file changed

+24
-4
lines changed

packages/docusaurus-theme-classic/src/theme/MDXComponents/Code.tsx

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,35 @@ import type {Props} from '@theme/MDXComponents/Code';
1313
export default function MDXCode(props: Props): JSX.Element {
1414
const inlineElements: (string | undefined)[] = [
1515
'a',
16+
'abbr',
1617
'b',
17-
'big',
18+
'br',
19+
'button',
20+
'cite',
21+
'code',
22+
'del',
23+
'dfn',
24+
'em',
1825
'i',
26+
'img',
27+
'input',
28+
'ins',
29+
'kbd',
30+
'label',
31+
'object',
32+
'output',
33+
'q',
34+
'ruby',
35+
's',
36+
'small',
1937
'span',
20-
'em',
2138
'strong',
22-
'sup',
2339
'sub',
24-
'small',
40+
'sup',
41+
'time',
42+
'u',
43+
'var',
44+
'wbr',
2545
];
2646
const shouldBeInline = React.Children.toArray(props.children).every(
2747
(el) =>

0 commit comments

Comments
 (0)