aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries
diff options
context:
space:
mode:
authorClay2022-05-31 02:32:14 +0000
committerGitHub2022-05-31 02:32:14 +0000
commitfc8c48832257672b92a1b3c08b79c6cbffad1761 (patch)
tree33d2ce1c4b93876b62fd7ce03319338861d9d2b4 /runtime/queries
parenteba82250bb4403fcb2e3ade74ba7301a680bc561 (diff)
Elixir: inject Markdown into docs, remove h sigil HEEx injection (#2619)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Diffstat (limited to 'runtime/queries')
-rw-r--r--runtime/queries/elixir/injections.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/queries/elixir/injections.scm b/runtime/queries/elixir/injections.scm
index c8882534..5c58a863 100644
--- a/runtime/queries/elixir/injections.scm
+++ b/runtime/queries/elixir/injections.scm
@@ -11,6 +11,15 @@
((sigil
(sigil_name) @_sigil_name
(quoted_content) @injection.content)
- (#match? @_sigil_name "^(h|H)$")
+ (#eq? @_sigil_name "H")
(#set! injection.language "heex")
(#set! injection.combined))
+
+(unary_operator
+ operator: "@"
+ operand: (call
+ target: ((identifier) @_identifier (#match? @_identifier "^(module|type|short)?doc$"))
+ (arguments [
+ (string (quoted_content) @injection.content)
+ (sigil (quoted_content) @injection.content)
+ ])) (#set! injection.language "markdown"))