diff options
author | Araq <rumpf_a@web.de> | 2013-08-31 07:33:30 -0700 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-08-31 07:33:30 -0700 |
commit | 84bd79458834f2e0cc38cbf4e3d639570b20bb96 (patch) | |
tree | 9e842330b25b9ee1bb712917daa34f6078411082 | |
parent | b40ab4dc9e4b5ee93f29864218af6b8d78fa1cc2 (diff) | |
parent | 64cf8d3893264b81839332ee1bfe65e49f373f77 (diff) | |
download | Nim-84bd79458834f2e0cc38cbf4e3d639570b20bb96.tar.gz |
Merge pull request #579 from gradha/pr_fixes_xmltree_macro_docstring
Fixes xmltree <> macro docstring.
-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."))) |