summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJuan Carlos <juancarlospaco@gmail.com>2019-11-15 16:23:03 -0300
committerAndreas Rumpf <rumpf_a@web.de>2019-11-15 20:23:03 +0100
commit9c46526cfa928f884b06ea78f3f7304bdc626ed1 (patch)
treec2f237443b7aeb640b26b8d2fb67d5764a87f264
parent83b7656c0e723a2e68459733e7706f3611a1ddc8 (diff)
downloadNim-9c46526cfa928f884b06ea78f3f7304bdc626ed1.tar.gz
Fix htmlgen html lang (#12668) [backport]
* Fix HTMLGen enable lang on html tag

-rw-r--r--changelog.md2
-rw-r--r--lib/pure/htmlgen.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/changelog.md b/changelog.md
index 2618629d0..2ff0cdf29 100644
--- a/changelog.md
+++ b/changelog.md
@@ -53,7 +53,7 @@
 - `htmlgen` adds [MathML](https://wikipedia.org/wiki/MathML) support
   (ISO 40314).
 - `macros.eqIdent` is now invariant to export markers and backtick quotes.
-
+- `htmlgen.html` allows `lang` on the `<html>` tag and common valid attributes.
 
 
 ## Language additions
diff --git a/lib/pure/htmlgen.nim b/lib/pure/htmlgen.nim
index 4887e6144..eb9dd9a73 100644
--- a/lib/pure/htmlgen.nim
+++ b/lib/pure/htmlgen.nim
@@ -321,7 +321,7 @@ macro header*(e: varargs[untyped]): untyped =
 
 macro html*(e: varargs[untyped]): untyped =
   ## generates the HTML ``html`` element.
-  result = xmlCheckedTag(e, "html", "xmlns", "")
+  result = xmlCheckedTag(e, "html", "xmlns" & commonAttr, "")
 
 macro hr*(): untyped =
   ## generates the HTML ``hr`` element.