mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-22 10:56:50 +00:00
Merge branch 'master' of github.com:Araq/Nimrod
This commit is contained in:
@@ -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.")))
|
||||
|
||||
Reference in New Issue
Block a user