mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-21 22:22:45 -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
4
.github/scripts/create-doc-md.js
vendored
4
.github/scripts/create-doc-md.js
vendored
|
@ -227,7 +227,9 @@ function generateMarkdownForItem(item) {
|
||||||
markdown += singleTab + `**Parameters:**\n\n`;
|
markdown += singleTab + `**Parameters:**\n\n`;
|
||||||
if (itemGroup.signatures[0] && itemGroup.signatures[0].parameters && itemGroup.signatures[0].parameters.some(param => param.comment)) {
|
if (itemGroup.signatures[0] && itemGroup.signatures[0].parameters && itemGroup.signatures[0].parameters.some(param => param.comment)) {
|
||||||
itemGroup.signatures[0].parameters.forEach(param => {
|
itemGroup.signatures[0].parameters.forEach(param => {
|
||||||
|
if (param.comment) {
|
||||||
markdown += getParamsComments(param.name, param.comment.summary, 2);
|
markdown += getParamsComments(param.name, param.comment.summary, 2);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
markdown += getMarkdownCodeBlock(
|
markdown += getMarkdownCodeBlock(
|
||||||
|
@ -344,7 +346,7 @@ function getParameters(signatures, tabs) {
|
||||||
function getBlockTag(commentBlockTag, tabs) {
|
function getBlockTag(commentBlockTag, tabs) {
|
||||||
const block = commentBlockTag.map((block) => {
|
const block = commentBlockTag.map((block) => {
|
||||||
return block.content.map(content => content.text).join(' \n');
|
return block.content.map(content => content.text).join(' \n');
|
||||||
}).join(' ');
|
}).join(' \n\n');
|
||||||
const formatContent = block.split('\n')
|
const formatContent = block.split('\n')
|
||||||
.map((item) => tabsNumber[tabs] + item)
|
.map((item) => tabsNumber[tabs] + item)
|
||||||
.join('\n');
|
.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';
|
* text.fontSize = '12';
|
||||||
* board.appendChild(text);
|
* board.appendChild(text);
|
||||||
* ```
|
* ```
|
||||||
|
* @document
|
||||||
|
* ![example image](https://placehold.co/600x400)
|
||||||
*/
|
*/
|
||||||
createText(text: string): PenpotText | null;
|
createText(text: string): PenpotText | null;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue