Просмотр исходного кода

fix: block-reference a block with heading:: true will display extra -

fix #1976
Tienson Qin 4 лет назад
Родитель
Сommit
6ecb51fa57
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/main/frontend/components/block.cljs

+ 3 - 1
src/main/frontend/components/block.cljs

@@ -1255,6 +1255,7 @@
                                 :as t}]
                                 :as t}]
   (let [config (assoc config :block t)
   (let [config (assoc config :block t)
         slide? (boolean (:slide? config))
         slide? (boolean (:slide? config))
+        block-ref? (:block-ref? config)
         html-export? (:html-export? config)
         html-export? (:html-export? config)
         checkbox (when (and (not pre-block?)
         checkbox (when (and (not pre-block?)
                             (not html-export?))
                             (not html-export?))
@@ -1276,7 +1277,8 @@
                                ;; FIXME: construct the proper level later
                                ;; FIXME: construct the proper level later
                                2))
                                2))
         elem (if heading-level
         elem (if heading-level
-               (keyword (str "h" heading-level))
+               (keyword (str "h" heading-level
+                             (when block-ref? ".inline")))
                :span.inline)]
                :span.inline)]
     (->elem
     (->elem
      elem
      elem