|
@@ -948,18 +948,18 @@
|
|
|
|
|
|
|
|
(defn- render-macro
|
|
(defn- render-macro
|
|
|
[config name arguments macro-content format]
|
|
[config name arguments macro-content format]
|
|
|
- (if macro-content
|
|
|
|
|
- (let [ast (->> (mldoc/->edn macro-content (gp-mldoc/default-config format))
|
|
|
|
|
- (map first))
|
|
|
|
|
- paragraph? (and (= 1 (count ast))
|
|
|
|
|
- (= "Paragraph" (ffirst ast)))]
|
|
|
|
|
- (if (and (not paragraph?)
|
|
|
|
|
- (mldoc/block-with-title? (ffirst ast)))
|
|
|
|
|
- [:div
|
|
|
|
|
- (markup-elements-cp (assoc config :block/format format) ast)]
|
|
|
|
|
- (inline-text format macro-content)))
|
|
|
|
|
- [:span.warning {:title (str "Unsupported macro name: " name)}
|
|
|
|
|
- (macro->text name arguments)]))
|
|
|
|
|
|
|
+ [:div {:class (str "macro " name)}
|
|
|
|
|
+ (if macro-content
|
|
|
|
|
+ (let [ast (->> (mldoc/->edn macro-content (gp-mldoc/default-config format))
|
|
|
|
|
+ (map first))
|
|
|
|
|
+ paragraph? (and (= 1 (count ast))
|
|
|
|
|
+ (= "Paragraph" (ffirst ast)))]
|
|
|
|
|
+ (if (and (not paragraph?)
|
|
|
|
|
+ (mldoc/block-with-title? (ffirst ast)))
|
|
|
|
|
+ (markup-elements-cp (assoc config :block/format format) ast)
|
|
|
|
|
+ (inline-text format macro-content)))
|
|
|
|
|
+ [:span.warning {:title (str "Unsupported macro name: " name)}
|
|
|
|
|
+ (macro->text name arguments)])])
|
|
|
|
|
|
|
|
(rum/defc nested-link < rum/reactive
|
|
(rum/defc nested-link < rum/reactive
|
|
|
[config html-export? link]
|
|
[config html-export? link]
|