diff --git a/.github/scripts/create-doc-md.js b/.github/scripts/create-doc-md.js index e2d2d20..d43c7a4 100644 --- a/.github/scripts/create-doc-md.js +++ b/.github/scripts/create-doc-md.js @@ -227,7 +227,9 @@ function generateMarkdownForItem(item) { markdown += singleTab + `**Parameters:**\n\n`; if (itemGroup.signatures[0] && itemGroup.signatures[0].parameters && itemGroup.signatures[0].parameters.some(param => param.comment)) { itemGroup.signatures[0].parameters.forEach(param => { - markdown += getParamsComments(param.name, param.comment.summary, 2); + if (param.comment) { + markdown += getParamsComments(param.name, param.comment.summary, 2); + } }); } markdown += getMarkdownCodeBlock( @@ -344,7 +346,7 @@ function getParameters(signatures, tabs) { function getBlockTag(commentBlockTag, tabs) { const block = commentBlockTag.map((block) => { return block.content.map(content => content.text).join(' \n'); - }).join(' '); + }).join(' \n\n'); const formatContent = block.split('\n') .map((item) => tabsNumber[tabs] + item) .join('\n'); diff --git a/libs/plugin-types/index.d.ts b/libs/plugin-types/index.d.ts index 4c8f934..e988b3e 100644 --- a/libs/plugin-types/index.d.ts +++ b/libs/plugin-types/index.d.ts @@ -2414,6 +2414,8 @@ export interface PenpotContext { * text.fontSize = '12'; * board.appendChild(text); * ``` + * @document + * ![example image](https://placehold.co/600x400) */ createText(text: string): PenpotText | null;