@dosgato/templating 0.0.103 → 0.0.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/links.d.ts CHANGED
@@ -85,4 +85,4 @@ export declare function extractLinksFromText(text: string | undefined): LinkDefi
85
85
  * This function is used by render definitions to replace links in large blocks with the actual
86
86
  * URLs they point to at render time.
87
87
  */
88
- export declare function replaceLinksInText(text: string, resolved: Map<string, string>): string;
88
+ export declare function replaceLinksInText(text: string, resolved: Map<string, string | undefined>): string;
package/dist/links.js CHANGED
@@ -14,6 +14,5 @@ export function extractLinksFromText(text) {
14
14
  * URLs they point to at render time.
15
15
  */
16
16
  export function replaceLinksInText(text, resolved) {
17
- // TODO: figure out a broken link to use instead of '#', so it can be detected later
18
- return text.replace(LinkRegex, m => resolved.get(m) ?? '#');
17
+ return text.replace(LinkRegex, m => resolved.get(m) ?? 'dg-broken-link');
19
18
  }
package/dist/render.d.ts CHANGED
@@ -71,10 +71,10 @@ export interface APIClient {
71
71
  * method to convert a link, as input by a user, into a URL suitable for an href, or optionally
72
72
  * an absolute URL suitable for a backend http request or non-HTML document like an RSS feed.
73
73
  */
74
- resolveLink: (lnk: string | LinkDefinition, opts?: {
74
+ resolveLink: (lnk: string | LinkDefinition | undefined, opts?: {
75
75
  absolute?: boolean;
76
76
  extension?: string;
77
- }) => Promise<string>;
77
+ }) => Promise<string | undefined>;
78
78
  /**
79
79
  * Get a link href for a page
80
80
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.103",
3
+ "version": "0.0.105",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {