2022-12-14 03:06:08 -05:00
|
|
|
;; Inject markdown in docstrings
|
2022-11-27 14:12:26 +02:00
|
|
|
((string_literal) @markdown
|
2022-12-14 03:06:08 -05:00
|
|
|
. [
|
|
|
|
|
(module_definition)
|
|
|
|
|
(abstract_definition)
|
|
|
|
|
(struct_definition)
|
|
|
|
|
(function_definition)
|
|
|
|
|
(assignment)
|
|
|
|
|
(const_declaration)
|
|
|
|
|
]
|
2023-04-21 04:06:20 -04:00
|
|
|
(#lua-match? @markdown "^\"\"\"")
|
2022-11-27 14:12:26 +02:00
|
|
|
(#offset! @markdown 0 3 0 -3))
|
2021-03-12 11:21:46 -05:00
|
|
|
|
2022-01-13 17:35:20 +01:00
|
|
|
[
|
2022-04-15 10:30:46 +02:00
|
|
|
(line_comment)
|
2022-01-13 17:35:20 +01:00
|
|
|
(block_comment)
|
|
|
|
|
] @comment
|
2022-11-26 14:27:21 +02:00
|
|
|
|
|
|
|
|
((prefixed_string_literal
|
|
|
|
|
prefix: (identifier) @_prefix) @regex
|
|
|
|
|
(#eq? @_prefix "r")
|
|
|
|
|
(#offset! @regex 0 2 0 -1))
|