Fix api tag parsing

This commit is contained in:
Aaron Carlino 2020-02-12 16:32:55 +13:00
parent c50398b563
commit 87cbb04d9b
1 changed files with 4 additions and 3 deletions

View File

@ -3,9 +3,10 @@
* @param html
*/
const cleanApiTags = (html: string): string => {
return html.replace(
return html
.replace(
/\[api:(.*?)\]([^(])/g,
(_, query, next) => `<a href="${query}">${query}</a>${next}`
(_, query, next) => `<a href="api:${query}">${query}</a>${next}`
)
};