Skip to content

Commit

Permalink
fix(treesitter): markdown injection
Browse files Browse the repository at this point in the history
  • Loading branch information
kiyoon committed Dec 16, 2024
1 parent 92b559f commit b0b7157
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions after/queries/python/injections.scm
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,27 @@
((
(comment) @_mdcomment
. (expression_statement
(string (string_content) @markdown @markdown_inline)))
(#lua-match? @_mdcomment "^# %%%% %[markdown%]"))
(string (string_content) @injection.content)))
(#lua-match? @_mdcomment "^# %%%% %[markdown%]")
(#set! injection.language "markdown"))

((
(comment) @_mdcomment
. (expression_statement
(string (string_content) @markdown @markdown_inline)))
(#lua-match? @_mdcomment "^# %%%% %[md%]"))
(string (string_content) @injection.content)))
(#lua-match? @_mdcomment "^# %%%% %[markdown%]")
(#set! injection.language "markdown_inline"))

((
(comment) @_mdcomment
. (expression_statement
(string (string_content) @injection.content)))
(#lua-match? @_mdcomment "^# %%%% %[md%]")
(#set! injection.language "markdown"))

((
(comment) @_mdcomment
. (expression_statement
(string (string_content) @injection.content)))
(#lua-match? @_mdcomment "^# %%%% %[md%]")
(#set! injection.language "markdown_inline"))

0 comments on commit b0b7157

Please sign in to comment.