Ver Fonte

fix: don't auto-complete tags when input headings

Tienson Qin há 1 ano atrás
pai
commit
ae76416083
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      src/main/frontend/handler/editor.cljs

+ 5 - 0
src/main/frontend/handler/editor.cljs

@@ -1940,6 +1940,11 @@
            (not db-based?))
       (state/clear-editor-action!)
 
+      (or (= last-input-char last-prev-input-char commands/hashtag)
+          (and (= last-prev-input-char commands/hashtag)
+               (= last-input-char " ")))
+      (state/clear-editor-action!)
+
       ;; Open "Search page or New page" auto-complete
       (and (= last-input-char commands/hashtag)
            ;; Only trigger at beginning of a line or before whitespace