Merge remote-tracking branch 'upstream/master' into whiteboards

This commit is contained in:
Peng Xiao
2022-08-29 10:45:15 +08:00
26 changed files with 178 additions and 77 deletions

View File

@@ -2735,9 +2735,15 @@
(do (util/stop e)
(autopair input-id "(" format nil))
;; If you type `xyz`, the last backtick should close the first and not add another autopair
;; If you type several backticks in a row, each one should autopair to accommodate multiline code (```)
(contains? (set (keys autopair-map)) key)
(do (util/stop e)
(autopair input-id key format nil))
(let [curr (get-current-input-char input)
prev (util/nth-safe value (dec pos))]
(util/stop e)
(if (and (= key "`") (= "`" curr) (not= "`" prev))
(cursor/move-cursor-forward input)
(autopair input-id key format nil)))
(and hashtag? (or (zero? pos) (re-matches #"\s" (get value (dec pos)))))
(do