Explorar o código

fix: Using a #tag in a line followed by a [[page-link]] causes line to
be erased

close #2149

Tienson Qin %!s(int64=4) %!d(string=hai) anos
pai
achega
648e1ca1a2
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/main/frontend/handler/editor.cljs

+ 3 - 1
src/main/frontend/handler/editor.cljs

@@ -2588,7 +2588,9 @@
 
         (when (= c " ")
           (when (or (= (util/nth-safe value (dec (dec current-pos))) "#")
-                    (not (state/get-editor-show-page-search?)))
+                    (not (state/get-editor-show-page-search?))
+                    (and (state/get-editor-show-page-search?)
+                         (not= (util/nth-safe value current-pos) "]")))
             (state/set-editor-show-page-search-hashtag! false)))
 
         (when (and @*show-commands (not= key-code 191)) ; not /