浏览代码

fix: backward pos for embeds

Tienson Qin 4 年之前
父节点
当前提交
536f1582dc
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/main/frontend/commands.cljs

+ 3 - 3
src/main/frontend/commands.cljs

@@ -50,13 +50,13 @@
   []
   []
   (conj
   (conj
    [[:editor/input "{{embed [[]]}}" {:last-pattern slash
    [[:editor/input "{{embed [[]]}}" {:last-pattern slash
-                                     :backward-pos 5}]]
+                                     :backward-pos 4}]]
    [:editor/search-page :embed]))
    [:editor/search-page :embed]))
 
 
 (defn embed-block
 (defn embed-block
   []
   []
   [[:editor/input "{{embed (())}}" {:last-pattern slash
   [[:editor/input "{{embed (())}}" {:last-pattern slash
-                                    :backward-pos 5}]
+                                    :backward-pos 4}]
    [:editor/search-block :embed]])
    [:editor/search-block :embed]])
 
 
 ;; Stop now!!
 ;; Stop now!!
@@ -126,7 +126,7 @@
      (when (state/logged?)
      (when (state/logged?)
        ["Upload an image" [[:editor/click-hidden-file-input :id]]])
        ["Upload an image" [[:editor/click-hidden-file-input :id]]])
      ["Embed Youtube Video" [[:editor/input "{{youtube }}" {:last-pattern slash
      ["Embed Youtube Video" [[:editor/input "{{youtube }}" {:last-pattern slash
-                                                            :backward-pos 3}]]]
+                                                            :backward-pos 2}]]]
      ["Html Inline " (->inline "html")]
      ["Html Inline " (->inline "html")]
 
 
      ;; TODO:
      ;; TODO: