summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorsschwarzer <sschwarzer@users.noreply.github.com>2019-08-12 11:12:22 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-08-12 11:12:22 +0200
commitc9c28bf85ee428e710a510a9825e514d30b0e298 (patch)
treed3d0fde2ecdfd6ce3de0c6886cf24eb0c2c435b1 /lib
parentda64c8762fd4af44866879061c10f707b0dcd310 (diff)
downloadNim-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.nim4
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]
 
1'>161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208