diff options
author | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-08-22 23:01:15 +0200 |
---|---|---|
committer | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-08-22 23:01:15 +0200 |
commit | 64cf8d3893264b81839332ee1bfe65e49f373f77 (patch) | |
tree | 92529a01ea2b1623099c12944ce4d548df5080dd /lib/pure | |
parent | a8c8a85135e73777ea2c115bf1352456c1dd69aa (diff) | |
download | Nim-64cf8d3893264b81839332ee1bfe65e49f373f77.tar.gz |
Fixes xmltree <> macro docstring.
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/xmltree.nim | 6 |
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."))) |