Skip to content

Commit

Permalink
fix parsed JSDoc author tag (#80898)
Browse files Browse the repository at this point in the history
* fix parsed JSDoc author tag

* fix author tag
  • Loading branch information
hypercubestart authored and mjbvz committed Jan 6, 2020
1 parent 9536692 commit 81fb34c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 81fb34c

Please sign in to comment.