Skip to content

Commit 2419d3a

Browse files
authored
Fix issue with displaying docs types special chars (#1690)
1 parent 317d408 commit 2419d3a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

scripts/build-docs.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ components.forEach(component => {
4848
extendsText = `[${extendsText}](${component.extendsLink})`;
4949
} else {
5050
extendsText = `[${extendsText}](${extendsText})`;
51-
5251
}
5352
content += `:::info\n`;
5453
content += `This component extends **${extendsText}** props.\n`;
@@ -75,10 +74,10 @@ components.forEach(component => {
7574
content += `### ${prop.name}\n`;
7675
content += `${prop.description} \n`;
7776
// content += `<span style={{color: 'grey'}}>${_.escape(prop.type)}</span>\n\n`;
78-
content += `<code>${_.escape(prop.type)}</code>\n\n`;
77+
content += `\`${prop.type} \` \n\n`;
7978
});
8079

81-
const componentParentDir = (componentParentName || isParentComponent) ? `/${componentParentName || componentName}` : '';
80+
const componentParentDir = componentParentName || isParentComponent ? `/${componentParentName || componentName}` : '';
8281
const dirPath = `${COMPONENTS_DOCS_DIR}/${component.category}${componentParentDir}`;
8382

8483
if (!fs.existsSync(dirPath)) {

src/components/hint/hint.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
{
2222
"name": "targetFrame",
23-
"type": "x?: number, y?: number, width?: number, height?: number",
23+
"type": "{x?: number, y?: number, width?: number, height?: number}",
2424
"description": "Provide custom target position instead of wrapping a child"
2525
},
2626
{"name": "useSideTip", "type": "boolean", "description": "Show side tips instead of the middle tip"},

0 commit comments

Comments
 (0)