aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/documents/Documents.ts2
-rw-r--r--src/client/util/LinkManager.ts4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 9c1278150..318493822 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -623,7 +623,7 @@ export namespace DocUtils {
LinkManager.Instance.addLink(linkDocProto);
- let script = `return links(this)};`;
+ let script = `return links(this);`;
let computed = CompileScript(script, { params: { this: "Doc" }, typecheck: false });
computed.compiled && (Doc.GetProto(source).links = new ComputedField(computed));
computed.compiled && (Doc.GetProto(target).links = new ComputedField(computed));
diff --git a/src/client/util/LinkManager.ts b/src/client/util/LinkManager.ts
index 448a8e9cf..c87e4a022 100644
--- a/src/client/util/LinkManager.ts
+++ b/src/client/util/LinkManager.ts
@@ -252,3 +252,7 @@ export class LinkManager {
Scripting.addGlobal(function links(doc: any) {
return new List(LinkManager.Instance.getAllRelatedLinks(doc));
});
+
+Scripting.addGlobal(function renameAlias(doc: any, n: any) {
+ return doc.title;// StrCast(doc.title).replace(/\\([0-9]*\\)/, "") + `(${n})`;
+});