fix parsed JSDoc author tag (#80898)

* fix parsed JSDoc author tag

* fix author tag
This commit is contained in:
Andrew Liu 2020-01-06 11:53:13 -08:00 committed by Matt Bierner
parent 9536692355
commit 81fb34c445

View file

@ -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);
}