diff options
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index f4141cf46..67f09f37b 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -63,6 +63,8 @@ export namespace Field { default: rawjava = field?.[ToJavascriptString]?.() ?? 'null'; } // prettier-ignore var script = rawjava; + // this is a bit hacky, but we treat '^@' references to a published document + // as a kind of macro to include the content of those documents Doc.MyPublishedDocs.forEach(doc => { const regex = new RegExp(`^\\^${doc.title}\\s`, 'm'); script = script.replace(regex, Cast(doc.text, RichTextField, null)?.Text ?? ''); |