fix parsed JSDoc author tag (#80898)
* fix parsed JSDoc author tag * fix author tag
This commit is contained in:
parent
9536692355
commit
81fb34c445
|
@ -28,7 +28,15 @@ function getTagBodyText(tag: Proto.JSDocTagInfo): string | undefined {
|
|||
} else {
|
||||
return makeCodeblock(tag.text);
|
||||
}
|
||||
case 'author':
|
||||
// fix obsucated email address, #80898
|
||||
const emailMatch = tag.text.match(/(.+)\s<([-.\w]+@[-.\w]+)>/);
|
||||
|
||||
if (emailMatch === null) {
|
||||
return tag.text;
|
||||
} else {
|
||||
return `${emailMatch[1]} ${emailMatch[2]}`;
|
||||
}
|
||||
case 'default':
|
||||
return makeCodeblock(tag.text);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue