Apidoc description section link type updates

pull/4591/head^2
Tuğçe Küçükoğlu 2023-10-11 11:48:53 +03:00
parent 7f77c6ac49
commit 0db1fc3b40
2 changed files with 15 additions and 2 deletions

View File

@ -352,7 +352,17 @@ if (project) {
readonly: prop.flags.isReadonly,
type: prop.type.toString(),
default: prop.comment && prop.comment.getTag('@defaultValue') ? prop.comment.getTag('@defaultValue').content[0].text : '', // TODO: Check
description: prop.comment && prop.comment.summary.map((s) => s.text || '').join(' '),
description:
prop.comment &&
prop.comment.summary
.map((s) => {
if (s.text.indexOf('[here]') > -1) {
return `${s.text.slice(0, s.text.indexOf('[here]'))} <a target="_blank" href="${s.text.slice(s.text.indexOf('(') + 1, s.text.indexOf(')'))}">here</a> ${s.text.slice(s.text.indexOf(')') + 1)}`;
}
return s.text || '';
})
.join(' '),
deprecated: prop.comment && prop.comment.getTag('@deprecated') ? parseText(prop.comment.getTag('@deprecated').content[0].text) : undefined
});
});

View File

@ -59,8 +59,11 @@
{{ v }}
</div>
<template v-else>
<span v-if="v?.includes('<a')" :id="id + '.' + k" class="doc-option-description" v-html="v"> </span>
<span v-else :id="id + '.' + k" class="doc-option-description">{{ v }} </span>
</template>
</template>
</td>
</tr>
</tbody>