From e98e2eafa29958a414e5785f58a9cbda117c1bf1 Mon Sep 17 00:00:00 2001 From: derekstride Date: Thu, 15 Apr 2021 15:48:48 -0230 Subject: downcase! directive to use with ruby injections ``` (#downcase! "language") ``` downcase! will ensure the metadata value for the specified key will be downcased. If the value is a node, it will downcase the text specified by the node. ``` (#downcase! @node "key") ``` You can also namespace the key with a specific capture, similar to how you can call `(#set! @node "key" "value")` --- queries/ruby/injections.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'queries/ruby') diff --git a/queries/ruby/injections.scm b/queries/ruby/injections.scm index 4bb7d675d..89bb058a6 100644 --- a/queries/ruby/injections.scm +++ b/queries/ruby/injections.scm @@ -1 +1,7 @@ (comment) @comment + +(heredoc_body + (heredoc_content) @content + (heredoc_end) @language + (#set! "language" @language) + (#downcase! "language")) -- cgit v1.2.3-70-g09d2