Skip to content

Commit 45d0c88

Browse files
committed
feat: Add syntax highlighting for markdown literals
1 parent 280900a commit 45d0c88

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

after/queries/julia/injections.scm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
;; extends
22

3+
;; Match a prefixed string literal and capture the prefix and content.
4+
((prefixed_string_literal
5+
;; Capture the prefix identifier and assign it to @prefix.
6+
prefix: (identifier) @prefix)
7+
;; Capture the entire string content and assign it to @injection.content.
8+
@injection.content
9+
;; Check if the captured prefix is "md".
10+
(#eq? @prefix "md")
11+
;; If the prefix is "md", set the injection language to "markdown".
12+
(#set! injection.language "markdown"))
13+
314
;; Inject Bash syntax highlighting into command_literal nodes.
415
((command_literal) @injection.content
516
(#set! injection.language "bash"))

0 commit comments

Comments
 (0)