@dosgato/templating
Advanced tools
Comparing version 0.0.104 to 0.0.105
@@ -88,2 +88,2 @@ /** | ||
*/ | ||
export declare function replaceLinksInText(text: string, resolved: Map<string, string>): string; | ||
export declare function replaceLinksInText(text: string, resolved: Map<string, string | undefined>): string; |
@@ -17,4 +17,3 @@ const LinkRegex = /{.*"type"\s?:\s+"\w+".*?}/g; | ||
export function replaceLinksInText(text, resolved) { | ||
// TODO: figure out a broken link to use instead of '#', so it can be detected later | ||
return text.replace(LinkRegex, m => resolved.get(m) ?? '#'); | ||
return text.replace(LinkRegex, m => resolved.get(m) ?? 'dg-broken-link'); | ||
} |
{ | ||
"name": "@dosgato/templating", | ||
"version": "0.0.104", | ||
"version": "0.0.105", | ||
"description": "A library to support building templates for dosgato CMS.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89038
2005