mirror of
https://github.com/helix-editor/helix
synced 2026-08-05 14:42:57 +02:00
The value of the pattern attribute in <input> elements are regular expressions. Documented here: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/pattern
18 lines
463 B
Scheme
18 lines
463 B
Scheme
((comment) @injection.content
|
|
(#set! injection.language "comment"))
|
|
|
|
((script_element
|
|
(raw_text) @injection.content)
|
|
(#set! injection.language "javascript"))
|
|
|
|
((style_element
|
|
(raw_text) @injection.content)
|
|
(#set! injection.language "css"))
|
|
|
|
; e.g. `<input pattern="[Bb]anana|[Cc]herry" />
|
|
(attribute
|
|
(attribute_name) @_attr (#eq? @_attr "pattern")
|
|
(quoted_attribute_value
|
|
(attribute_value) @injection.content)
|
|
(#set! injection.language "regex"))
|