summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--queries/markdown/highlights.scm46
1 files changed, 25 insertions, 21 deletions
diff --git a/queries/markdown/highlights.scm b/queries/markdown/highlights.scm
index b7b75b35..dbb79fa3 100644
--- a/queries/markdown/highlights.scm
+++ b/queries/markdown/highlights.scm
@@ -81,32 +81,36 @@
] @conceal
(#set! conceal ""))
-(inline_link
- ["]"] @conceal
- (#set! conceal " "))
+;; Inline_link Conceal
+; Conceal preceeding "[" character for inline links
(inline_link
"[" @conceal
(#set! conceal ""))
-;; Conceal @text.uri preceding '('
-([
- (link_label)
- (link_text)
- (image_description)
-] ["("] @conceal
-(#set! conceal ""))
-
-;; Conceal @text.uri text
-([
- (link_destination)
- (uri_autolink)
+; Conceal inline links
+(inline_link
+ [
+ "]"
+ "("
+ (link_destination)
+ ")"
] @conceal
(#set! conceal ""))
-;; Conceal @text.uri proceding '('
-([
- (link_destination)
- (uri_autolink)
-] [")"] @conceal
-(#set! conceal ""))
+
+;; Image Conceal
+; Conceal preceeding "!" and "[" characters for image links
+(image
+ ["!" "["] @conceal
+ (#set! conceal ""))
+
+; Conceal image links
+(image
+ [
+ "]"
+ "("
+ (link_destination)
+ ")"
+] @conceal
+ (#set! conceal ""))