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:
parent
a95c4b8eaf
commit
2b12fe96cb
2 changed files with 6 additions and 2 deletions
6
.github/scripts/create-doc-md.js
vendored
6
.github/scripts/create-doc-md.js
vendored
|
@ -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');
|
||||
|
|
2
libs/plugin-types/index.d.ts
vendored
2
libs/plugin-types/index.d.ts
vendored
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue