diff options
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/util/DropConverter.ts | 2 | ||||
| -rw-r--r-- | src/client/views/nodes/DocumentContentsView.tsx | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts index 28d88d867..69dc303cd 100644 --- a/src/client/util/DropConverter.ts +++ b/src/client/util/DropConverter.ts @@ -24,7 +24,7 @@ export function makeTemplate(doc: Doc, first: boolean = true, rename: Opt<string let any = false; docs.forEach(d => { if (!StrCast(d.title).startsWith("-")) { - const params = StrCast(d.title).match(/\(([a-zA-Z0-9_-]*)\)/)?.[1].replace("()", ""); + const params = StrCast(d.title).match(/\(([a-zA-Z0-9._\-]*)\)/)?.[1].replace("()", ""); if (params) { any = makeTemplate(d, false) || any; d.PARAMS = params; diff --git a/src/client/views/nodes/DocumentContentsView.tsx b/src/client/views/nodes/DocumentContentsView.tsx index 5ef330c5a..fbacdcffd 100644 --- a/src/client/views/nodes/DocumentContentsView.tsx +++ b/src/client/views/nodes/DocumentContentsView.tsx @@ -78,7 +78,8 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & { return proto instanceof Promise ? undefined : proto; } get layoutDoc() { - return Doc.expandTemplateLayout(this.props.LayoutDoc?.() || Doc.Layout(this.props.Document), this.props.Document, "(" + StrCast(this.props.Document.PARAMS) + ")"); + const params = StrCast(this.props.Document.PARAMS); + return Doc.expandTemplateLayout(this.props.LayoutDoc?.() || Doc.Layout(this.props.Document), this.props.Document, params ? "(" + params + ")" : this.props.layoutKey); } CreateBindings(): JsxBindings { |
