diff options
author | sschwarzer <sschwarzer@users.noreply.github.com> | 2019-08-12 11:12:22 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-08-12 11:12:22 +0200 |
commit | c9c28bf85ee428e710a510a9825e514d30b0e298 (patch) | |
tree | d3d0fde2ecdfd6ce3de0c6886cf24eb0c2c435b1 /lib | |
parent | da64c8762fd4af44866879061c10f707b0dcd310 (diff) | |
download | Nim-c9c28bf85ee428e710a510a9825e514d30b0e298.tar.gz |
Update documentation on `xmltree.items`/`mitems` (#11930)
* Update documentation on `xmltree.items`/`mitems` So far the documentation on `items` and `mitems` wasn't explicit about whether the iteration recurses down the node's children or not. I assumed recursion, which was wrong. * Improve wording in comment Use the more common and shorter word "direct".
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/xmltree.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/xmltree.nim b/lib/pure/xmltree.nim index 01e7f8bc6..5d5eea4d9 100644 --- a/lib/pure/xmltree.nim +++ b/lib/pure/xmltree.nim @@ -392,7 +392,7 @@ proc clear*(n: var XmlNode) = iterator items*(n: XmlNode): XmlNode {.inline.} = - ## Iterates over any child of `n`. + ## Iterates over all direct children of `n`. ## ## **Examples:** ## @@ -417,7 +417,7 @@ iterator items*(n: XmlNode): XmlNode {.inline.} = for i in 0 .. n.len-1: yield n[i] iterator mitems*(n: var XmlNode): var XmlNode {.inline.} = - ## Iterates over any child of `n` so that it can be modified. + ## Iterates over all direct children of `n` so that they can be modified. assert n.k == xnElement for i in 0 .. n.len-1: yield n[i] |