Skip to content

Commit

Permalink
ci: returns template moddified
Browse files Browse the repository at this point in the history
  • Loading branch information
banasa44 committed Feb 19, 2024
1 parent 4d07c15 commit 4a622a0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
11 changes: 11 additions & 0 deletions docs/tweaks/helpers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

exports.stripTags = stripTags

function stripTags(input) {
// Replace HTML entities with their corresponding characters
var decodedInput = input.replace(/&lt;/g, '<').replace(/&gt;/g, '>');
// Remove <p> tags
return decodedInput.replace(/<\/?p>/ig, "");
}


12 changes: 12 additions & 0 deletions docs/tweaks/returns.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{#if returns}}
{{#if returns.[0].description~}}
**Returnsssss**: {{#each returns~}}
{{#if type~}}
{{#if type.names}}{{>linked-type-list types=type.names delimiter=" \| " ~}}{{/if}}
{{~#if description}} - <p>`{{{stripTags (inlineLinks description)}}}`</p>{{/if~}}
{{else~}}
{{{inlineLinks description}~}}
{{/if~}}
{{~/each}}

{{/if}}{{/if}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"docs:client": "jsdoc2md --template ./docs/template/main.hbs --files ./modules/client/src/*.ts ./modules/client/src/internal/client/*.ts --configure ./jsdoc2md.json | sed -r 's/(\\{[a-zA-Z]+<[a-zA-Z]+>\\})/`\\1`/mg' > ./docs/sdk/02-reference-guide/01-client.md",
"docs:multisig": "jsdoc2md --template ./docs/template/main.hbs --files ./modules/client/src/multisig/*.ts ./modules/client/src/multisig/internal/client/*.ts --configure ./jsdoc2md.json | sed -r 's/(\\{[a-zA-Z]+<[a-zA-Z]+>\\})/`\\1`/mg' > ./docs/sdk/02-reference-guide/02-multisig.md",
"docs:tokenVoting": "jsdoc2md --template ./docs/template/main.hbs --files ./modules/client/src/tokenVoting/*.ts ./modules/client/src/tokenVoting/internal/client/*.ts --configure ./jsdoc2md.json | sed -r 's/(\\{[a-zA-Z]+<[a-zA-Z]+>\\})/`\\1`/mg' > ./docs/sdk/02-reference-guide/03-token-voting.md",
"docs:addresslistVoting": "jsdoc2md --template ./docs/template/main.hbs --files ./modules/client/src/addresslistVoting/*.ts ./modules/client/src/addresslistVoting/internal/client/*.ts --configure ./jsdoc2md.json | sed -r 's/(\\{[a-zA-Z]+<[a-zA-Z]+>\\})/`\\1`/mg' > ./docs/sdk/02-reference-guide/04-addresslist-voting.md",
"docs:addresslistVoting": "jsdoc2md --no-cache --partial docs/tweaks/*.hbs --helper docs/tweaks/*.js --files ./modules/client/src/addresslistVoting/*.ts ./modules/client/src/addresslistVoting/internal/client/*.ts --configure ./jsdoc2md.json > ./docs/sdk/02-reference-guide/04-addresslist-voting.md",
"docs:examples": "node ./modules/client/scripts/generate-markdown.js ./modules/client/examples && rsync -avr --prune-empty-dirs --remove-source-files --include='*/' --include='*.md' --exclude='*' ./modules/client/examples/ ./docs/sdk/01-examples/ --delete;"
},
"devDependencies": {
Expand Down

0 comments on commit 4a622a0

Please sign in to comment.