feat(format-scripts): linewrap predicates

"format-ignore".kick()
This commit is contained in:
再生花 2024-02-23 17:42:01 +09:00 committed by GitHub
parent a29058fe8b
commit 31641d72a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 1622 additions and 1537 deletions

View file

@ -6,7 +6,10 @@
name: (type) @_type
body: (body) @injection.content)
(#set! injection.language "rst")
(#any-of? @_type "attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition" "line-block" "parsed-literal" "epigraph" "highlights" "pull-quote" "compound" "header" "footer" "meta" "replace"))
(#any-of? @_type
"attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition"
"line-block" "parsed-literal" "epigraph" "highlights" "pull-quote" "compound" "header" "footer"
"meta" "replace"))
; Directives with nested content without arguments, but with options
((directive
@ -16,7 +19,9 @@
(options)
(content) @injection.content))
(#set! injection.language "rst")
(#any-of? @_type "attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition" "line-block" "parsed-literal" "compound"))
(#any-of? @_type
"attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition"
"line-block" "parsed-literal" "compound"))
; Directives with nested content with arguments and options
((directive
@ -25,7 +30,9 @@
(body
(content) @injection.content))
(#set! injection.language "rst")
(#any-of? @_type "figure" "topic" "sidebar" "container" "table" "list-table" "class" "role" "restructuredtext-test-directive"))
(#any-of? @_type
"figure" "topic" "sidebar" "container" "table" "list-table" "class" "role"
"restructuredtext-test-directive"))
; Special directives
((directive