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)
|
* Completes the shorthand [api:Something] syntax to [api:Something](Something)
|
||||||
* @param html
|
* @param html
|
||||||
*/
|
*/
|
||||||
const cleanApiTags = (html: string): string => {
|
const cleanApiTags = (html: string): string => {
|
||||||
return html.replace(
|
return html
|
||||||
|
.replace(
|
||||||
/\[api:(.*?)\]([^(])/g,
|
/\[api:(.*?)\]([^(])/g,
|
||||||
(_, query, next) => `<a href="${query}">${query}</a>${next}`
|
(_, query, next) => `<a href="api:${query}">${query}</a>${next}`
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue