dwim: support admonition

This commit is contained in:
leizhe
2021-10-02 07:58:31 +09:00
committed by Tienson Qin
parent 0545cf2855
commit 8ab1dbdd40
2 changed files with 25 additions and 1 deletions

View File

@@ -2296,7 +2296,8 @@
has-right? (-> (tree/-get-right current-node)
(tree/satisfied-inode?))
thing-at-point ;intern is not supported in cljs, need a more elegant solution
(or (thingatpt/markup-at-point input)
(or (thingatpt/admonition&src-at-point input)
(thingatpt/markup-at-point input)
(thingatpt/block-ref-at-point input)
(thingatpt/page-ref-at-point input)
(thingatpt/properties-at-point input)
@@ -2310,6 +2311,8 @@
input
(+ (string/index-of content right-bound pos)
(count right-bound))))
"admonition-block" (keydown-new-line)
"source-block" (keydown-new-line)
"block-ref" (open-block-in-sidebar! (:link thing-at-point))
"page-ref" (route-handler/redirect-to-page! (:link thing-at-point))
"list-item"