diff --git a/lib/pure/htmlgen.nim b/lib/pure/htmlgen.nim index 7a39e6d401..3a1ed23065 100644 --- a/lib/pure/htmlgen.nim +++ b/lib/pure/htmlgen.nim @@ -10,6 +10,10 @@ ## Do yourself a favor and import the module ## as ``from htmlgen import nil`` and then fully qualify the macros. ## +## *Note*: The Karax project (``nimble install karax``) has a better +## way to achieve the same, see `https://github.com/pragmagic/karax/blob/master/tests/nativehtmlgen.nim`_ +## for an example. +## ## ## This module implements a simple `XML`:idx: and `HTML`:idx: code ## generator. Each commonly used HTML tag has a corresponding macro @@ -20,11 +24,11 @@ ## ## .. code-block:: Nim ## var nim = "Nim" -## echo h1(a(href="http://nim-lang.org", nim)) +## echo h1(a(href="https://nim-lang.org", nim)) ## ## Writes the string:: ## -##

Nim

+##

Nim

## import @@ -606,7 +610,7 @@ macro wbr*(e: varargs[untyped]): untyped = runnableExamples: let nim = "Nim" - assert h1(a(href = "http://nim-lang.org", nim)) == - """

Nim

""" + assert h1(a(href = "https://nim-lang.org", nim)) == + """

Nim

""" assert form(action = "test", `accept-charset` = "Content-Type") == """
"""