summary refs log tree commit diff stats
path: root/lib/pure/htmlgen.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-10-10 13:47:47 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-10-10 13:47:55 +0200
commit00e06bba2808a3a75f7543d89a60078356c71127 (patch)
tree572b7b075a5af59786c76bf363e18900477484ab /lib/pure/htmlgen.nim
parentd783c0f7ff51e85d85bb7c85d2d2c9556cfcbe60 (diff)
downloadNim-00e06bba2808a3a75f7543d89a60078356c71127.tar.gz
minor improvements for htmlgen.nim
Diffstat (limited to 'lib/pure/htmlgen.nim')
-rw-r--r--lib/pure/htmlgen.nim12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/pure/htmlgen.nim b/lib/pure/htmlgen.nim
index 7a39e6d40..3a1ed2306 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::
 ##
-##   <h1><a href="http://nim-lang.org">Nim</a></h1>
+##   <h1><a href="https://nim-lang.org">Nim</a></h1>
 ##
 
 import
@@ -606,7 +610,7 @@ macro wbr*(e: varargs[untyped]): untyped =
 
 runnableExamples:
   let nim = "Nim"
-  assert h1(a(href = "http://nim-lang.org", nim)) ==
-    """<h1><a href="http://nim-lang.org">Nim</a></h1>"""
+  assert h1(a(href = "https://nim-lang.org", nim)) ==
+    """<h1><a href="https://nim-lang.org">Nim</a></h1>"""
   assert form(action = "test", `accept-charset` = "Content-Type") ==
     """<form action="test" accept-charset="Content-Type"></form>"""