about summary refs log tree commit diff stats
path: root/src/html/catom.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-07-28 20:50:51 +0200
committerbptato <nincsnevem662@gmail.com>2024-07-28 21:06:28 +0200
commit9653c35fb9a4398942ecb305835a95fbd87c433a (patch)
tree2db576e71cd89557592715d64ecb4fb4a46f8c66 /src/html/catom.nim
parentdbf2e0e831ebaf8a0e6f375a8f423f87280e7862 (diff)
downloadchawan-9653c35fb9a4398942ecb305835a95fbd87c433a.tar.gz
buffer, pager, config: add meta-refresh + misc fixes
* buffer, pager, config: add meta-refresh value, which makes it possible
  to follow http-equiv=refresh META tags.
* config: clean up redundant format mode parser
* timeout: accept varargs for params to pass on to functions
* pager: add "options" dict to JS gotoURL
* twtstr: remove redundant startsWithNoCase
Diffstat (limited to 'src/html/catom.nim')
-rw-r--r--src/html/catom.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/html/catom.nim b/src/html/catom.nim
index f22d74ef..0ff7b949 100644
--- a/src/html/catom.nim
+++ b/src/html/catom.nim
@@ -9,6 +9,7 @@ import monoucha/javascript
 import monoucha/jserror
 import monoucha/tojs
 import types/opt
+import utils/twtstr
 
 # create a static enum compatible with chame/tags
 
@@ -33,6 +34,7 @@ macro makeStaticAtom =
       satColor = "color"
       satCols = "cols"
       satColspan = "colspan"
+      satContent = "content"
       satCrossorigin = "crossorigin"
       satDOMContentLoaded = "DOMContentLoaded"
       satDefer = "defer"
@@ -102,7 +104,7 @@ macro makeStaticAtom =
     if t == TAG_UNKNOWN:
       continue
     let tn = $t
-    let name = "sat" & tn[0].toUpperAscii() & tn.substr(1)
+    let name = "sat" & tn[0].toUpperAscii() & tn.substr(1).kebabToCamelCase()
     seen.incl(tn)
     decl0.add(newNimNode(nnkEnumFieldDef).add(ident(name), newStrLitNode(tn)))
   for i, f in StaticAtom0.getType():