aboutsummaryrefslogtreecommitdiff
path: root/src/fields/RichTextUtils.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-06-13 23:19:27 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-06-13 23:19:27 -0400
commite2423815ef608f35fdb9c1625d7de0bf5a5fe206 (patch)
treee4b23aae0184883c64aada93910ceffa9ea2d0fd /src/fields/RichTextUtils.ts
parentc3fcbe3b416b9719d26fb19999f63f17d1d3c6c6 (diff)
fixes to make link lines work correctly with text anchors that have more than one link. fixed problem making a text link anchor by adding dummy mark to split the selection first.
Diffstat (limited to 'src/fields/RichTextUtils.ts')
-rw-r--r--src/fields/RichTextUtils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fields/RichTextUtils.ts b/src/fields/RichTextUtils.ts
index f81ec8c6d..66959882d 100644
--- a/src/fields/RichTextUtils.ts
+++ b/src/fields/RichTextUtils.ts
@@ -392,7 +392,7 @@ export namespace RichTextUtils {
const { attrs } = mark;
switch (converted) {
case "link":
- let url = attrs.href;
+ let url = attrs.allHrefs.length ? attrs.allHrefs[0].href : "";
const delimiter = "/doc/";
const alreadyShared = "?sharing=true";
if (new RegExp(window.location.origin + delimiter).test(url) && !url.endsWith(alreadyShared)) {