We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 665b979 commit 565b795Copy full SHA for 565b795
src/utils/jsdoc.ts
@@ -95,10 +95,11 @@ function renderJsDocTagAsPlainText(tag: JsDocBlockTag): string {
95
96
if (tag.value) {
97
if (tag.name === 'example') {
98
- if (tag.value.match(/^[\n\r \t]/)) {
99
- result += `:${tag.value}`;
+ const value = tag.value.replace(/[\n]?$/g, '\n');
+ if (value.match(/^[\n]/)) {
100
+ result += `:\n\`\`\`${value}\`\`\``;
101
} else {
- result += `:${tag.value.replace(/^([^\n]+)\n/, ' "$1":\n```')}\`\`\``;
102
+ result += `:${value.replace(/^([^\n]+)\n/, ' "$1":\n```')}\`\`\``;
103
}
104
105
result += ':';
0 commit comments