diff --git a/package.json b/package.json index 85141494b70..cf41d0a7722 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "gulp-cached": "^1.1.1", "ignore": "^5.1.8", "jszip": "^3.5.0", - "mldoc": "0.5.4", + "mldoc": "0.5.5", "mousetrap": "^1.6.5", "path": "^0.12.7", "react": "^17.0.1", diff --git a/src/main/frontend/format/block.cljs b/src/main/frontend/format/block.cljs index 5f5b87cfbdf..a073ad5b503 100644 --- a/src/main/frontend/format/block.cljs +++ b/src/main/frontend/format/block.cljs @@ -60,11 +60,11 @@ (and (vector? block) (= "Macro" (first block))) (let [{:keys [name arguments]} (second block)] - (when (and (= name "embed") - (string? (first arguments)) - (string/starts-with? (first arguments) "[[") - (string/ends-with? (first arguments) "]]")) - (subs (first arguments) 2 (- (count (first arguments)) 2)))) + (let [argument (string/join ", " arguments)] + (when (and (= name "embed") + (string? argument) + (text/page-ref? argument)) + (text/page-ref-un-brackets! argument)))) :else nil)] (when (and diff --git a/src/main/frontend/handler/export.cljs b/src/main/frontend/handler/export.cljs index 06658467456..28365f1418a 100644 --- a/src/main/frontend/handler/export.cljs +++ b/src/main/frontend/handler/export.cljs @@ -199,7 +199,6 @@ {:embed_blocks embed-blocks :embed_pages pages-name-and-content})) - (defn export-repo-as-markdown! [repo] (when-let [repo (state/get-current-repo)] diff --git a/yarn.lock b/yarn.lock index 11babbea489..820020d368d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3846,10 +3846,10 @@ mkdirp@^0.5.4, mkdirp@~0.5.1: dependencies: minimist "^1.2.5" -mldoc@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-0.5.4.tgz#3157d2bbd200567a8e5dc9cc9b54ce81c57466c1" - integrity sha512-lNDaxF/ysVML28WYaM3xMA+VDmSURI3CUgyM5p5qwZ+PphFQtgF4+e86sPV7uc1gGE2wRenQZ8F0U9IP1TQNpQ== +mldoc@0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-0.5.5.tgz#cb7eea471adc94e1c7858d4ae772ddabe0a75753" + integrity sha512-acseZvvwzLNlvp6/fZzqP5rqS80keWOK1XCreem5eXJNxLtJm+xIqzEJVcsmeyFS1Leya1gPT7dMcCUOhEr26g== dependencies: yargs "^12.0.2"