0
Fork 0
mirror of https://github.com/penpot/penpot-plugins.git synced 2025-01-21 06:02:34 -05:00

chore: api doc allow images

This commit is contained in:
Marina López 2024-06-25 09:54:16 +02:00
parent a95c4b8eaf
commit 2b12fe96cb
2 changed files with 6 additions and 2 deletions

View file

@ -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');

View file

@ -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;