We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb25eb5 commit 3be522fCopy full SHA for 3be522f
src/generators/jsx-ast/utils/buildPropertyTable.mjs
@@ -36,12 +36,16 @@ export const classifyTypeNode = node => {
36
* @param {Array<import('mdast').PhrasingContent>} children - Paragraph content nodes
37
*/
38
export const extractPropertyName = children => {
39
- if (!children.length) return;
+ if (!children.length) {
40
+ return;
41
+ }
42
43
const first = children[0];
44
45
// Inline code (`foo`) becomes <code>foo</code>
46
if (first.type === 'inlineCode') {
47
+ // Remove the node from the children, as we processed it.
48
+ children.shift();
49
return createElement('code', first.value.trimEnd());
50
}
51
0 commit comments