summaryrefslogtreecommitdiff
path: root/book/src/guides/indent.md
diff options
context:
space:
mode:
authorDaniel Ebert2022-10-08 09:04:11 +0000
committerBlaž Hrastnik2022-10-11 07:48:04 +0000
commit081327695f7d4740f8a66bf2da75905656f70a58 (patch)
tree828975fc4aa56e447fd2c1e2857e00e89366e101 /book/src/guides/indent.md
parentdc443487d4be520efb667f9f93b6c3cbd22e81fd (diff)
Rename extend indent captures.
Clarify comments in indent code.
Diffstat (limited to 'book/src/guides/indent.md')
-rw-r--r--book/src/guides/indent.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/book/src/guides/indent.md b/book/src/guides/indent.md
index 13550846..0e259289 100644
--- a/book/src/guides/indent.md
+++ b/book/src/guides/indent.md
@@ -46,16 +46,16 @@ capture on the same line, the indent level isn't changed at all.
- `@outdent` (default scope `all`):
Decrease the indent level by 1. The same rules as for `@indent` apply.
-- `@extend-indented`:
+- `@extend`:
Extend the range of this node to the end of the line and to lines that
are indented more than the line that this node starts on. This is useful
for languages like Python, where for the purpose of indentation some nodes
(like functions or classes) should also contain indented lines that follow them.
-- `@stop-extend`:
+- `@extend.prevent-once`:
Prevents the first extension of an ancestor of this node. For example, in Python
a return expression always ends the block that it is in. Note that this only stops the
-extension of the next `@extend-indented` capture. If multiple ancestors are captured,
+extension of the next `@extend` capture. If multiple ancestors are captured,
only the extension of the innermost one is prevented. All other ancestors are unaffected
(regardless of whether the innermost ancestor would actually have been extended).