summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-08-31 20:45:47 +0200
committerAraq <rumpf_a@web.de>2013-08-31 20:45:47 +0200
commit0464a1071eb09fd77893a8981a155e33a899137e (patch)
tree48e162e98aa1385c0115281bf6ebb19684d7b340 /lib
parent023bd63d391f31c17a746f430f9566b790c0c03a (diff)
parent84bd79458834f2e0cc38cbf4e3d639570b20bb96 (diff)
downloadNim-0464a1071eb09fd77893a8981a155e33a899137e.tar.gz
Merge branch 'master' of github.com:Araq/Nimrod
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/xmltree.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pure/xmltree.nim b/lib/pure/xmltree.nim
index 7621094f3..95b48a850 100644
--- a/lib/pure/xmltree.nim
+++ b/lib/pure/xmltree.nim
@@ -273,7 +273,7 @@ macro `<>`*(x: expr): expr {.immediate.} =
   ## Constructor macro for XML. Example usage:
   ##
   ## .. code-block:: nimrod
-  ##   <>a(href="http://nimrod-code.org", "Nimrod rules.")
+  ##   <>a(href="http://nimrod-code.org", newText("Nimrod rules."))
   ##
   ## Produces an XML tree for::
   ##
@@ -334,3 +334,7 @@ proc findAll*(n: PXmlNode, tag: string): seq[PXmlNode] =
   ##     process(imgTag)
   newSeq(result, 0)
   findAll(n, tag, result)
+
+when isMainModule:
+  assert """<a href="http://nimrod-code.org">Nimrod rules.</a>""" ==
+    $(<>a(href="http://nimrod-code.org", newText("Nimrod rules.")))