mirror of
https://github.com/silverstripe/doc.silverstripe.org
synced 2024-10-22 15:05:50 +00:00
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…
x
Reference in New Issue
Block a user