diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-03-30 17:10:04 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-03-30 17:10:04 -0400 |
| commit | 486e84c725b60a1dd1312c7903a4d248aa44d4e8 (patch) | |
| tree | 3ae781c3167abae4eb4a72ffc99b9a75256cca54 /src/client/util/RichTextRules.ts | |
| parent | 71b0e84cb852bc171a5df96b36cbb5f7bd1c150c (diff) | |
fixed captions and got rid of inappropriate references to Doc.expandTemplate
Diffstat (limited to 'src/client/util/RichTextRules.ts')
| -rw-r--r-- | src/client/util/RichTextRules.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/RichTextRules.ts b/src/client/util/RichTextRules.ts index 0b6fdff42..b0a124cb8 100644 --- a/src/client/util/RichTextRules.ts +++ b/src/client/util/RichTextRules.ts @@ -118,8 +118,8 @@ export class RichTextRules { new InputRule( new RegExp(/\{\{([a-zA-Z_ \-0-9]*)(\([a-zA-Z0-9…._\-]*\))?(:[a-zA-Z_ \-0-9]+)?\}\}$/), (state, match, start, end) => { - const fieldKey = match[1]; - const fieldParam = match[2]?.replace("…", "..."); + const fieldKey = match[1] || ""; + const fieldParam = match[2]?.replace("…", "...") || ""; const docid = match[3]?.substring(1); if (!fieldKey && !docid) return state.tr; docid && DocServer.GetRefField(docid).then(docx => { |
