Skip to content

Commit 35f3254

Browse files
authored
Docs: Describe range in rule docs (fixes #14162) (#15174)
1 parent b5049c8 commit 35f3254

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/developer-guide/working-with-rules.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ The `fixer` object has the following methods:
321321
* `replaceText(nodeOrToken, text)` - replaces the text in the given node or token
322322
* `replaceTextRange(range, text)` - replaces the text in the given range
323323

324+
A range is a two-item array containing character indices inside of the source code. The first item is the start of the range (inclusive) and the second item is the end of the range (exclusive). Every node and token has a `range` property to identify the source code range they represent.
325+
324326
The above methods return a `fixing` object.
325327
The `fix()` function can return the following values:
326328

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy