fix(tl-utils): handle <br>

This commit is contained in:
teidesu 2022-08-12 17:22:40 +03:00
parent be343b561e
commit 9b027425dd

View file

@ -12,6 +12,7 @@ export function jsComment(s: string): string {
'/**' +
// awesome hack not to break up {@link} links and <a href
s
.replace(/<br\/?>/g, '\n\n')
.replace(/{@link (.*?)}/g, '{@linkƒ$1}')
.replace(/<a href/g, '<aƒhref')
.replace(/(?![^\n]{1,60}$)([^\n]{1,60})\s/g, '$1\n')