Merge branch 'master' of github.com:Araq/Nimrod

This commit is contained in:
Araq 2013-08-31 20:45:47 +02:00
commit 0464a1071e

View file

@ -273,7 +273,7 @@ macro `<>`*(x: expr): expr {.immediate.} =
## Constructor macro for XML. Example usage: ## Constructor macro for XML. Example usage:
## ##
## .. code-block:: nimrod ## .. 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:: ## Produces an XML tree for::
## ##
@ -334,3 +334,7 @@ proc findAll*(n: PXmlNode, tag: string): seq[PXmlNode] =
## process(imgTag) ## process(imgTag)
newSeq(result, 0) newSeq(result, 0)
findAll(n, tag, result) 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.")))