Fix api tag parsing
This commit is contained in:
parent
c50398b563
commit
87cbb04d9b
|
@ -2,10 +2,11 @@
|
|||
* Completes the shorthand [api:Something] syntax to [api:Something](Something)
|
||||
* @param html
|
||||
*/
|
||||
const cleanApiTags = (html: string): string => {
|
||||
return html.replace(
|
||||
const cleanApiTags = (html: string): string => {
|
||||
return html
|
||||
.replace(
|
||||
/\[api:(.*?)\]([^(])/g,
|
||||
(_, query, next) => `<a href="${query}">${query}</a>${next}`
|
||||
(_, query, next) => `<a href="api:${query}">${query}</a>${next}`
|
||||
)
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue