diff options
| author | bptato <nincsnevem662@gmail.com> | 2023-10-01 00:48:09 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2023-10-01 00:48:09 +0200 |
| commit | 32e2e6bb572d2ae41e65cbbc50684d586105d234 (patch) | |
| tree | f85d97c768f1a7053835e0a9d63c8b35fdfc93e2 /src/html | |
| parent | f1814211abadd994cdf20e50a9e50fcf122acf85 (diff) | |
| download | chawan-32e2e6bb572d2ae41e65cbbc50684d586105d234.tar.gz | |
Use twtstr.join everywhere
Diffstat (limited to 'src/html')
| -rw-r--r-- | src/html/dom.nim | 2 | ||||
| -rw-r--r-- | src/html/enums.nim | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index 9880f70d..008a4e8a 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -809,7 +809,7 @@ proc attr*(element: Element, name, value: string) func baseURL*(document: Document): URL proc tostr(ftype: enum): string = - return ($ftype).split('_')[1..^1].join("-").toLowerAscii() + return ($ftype).split('_')[1..^1].join('-').toLowerAscii() func escapeText(s: string, attribute_mode = false): string = var nbsp_mode = false diff --git a/src/html/enums.nim b/src/html/enums.nim index 54de6af6..5cc4e466 100644 --- a/src/html/enums.nim +++ b/src/html/enums.nim @@ -1,6 +1,8 @@ import strutils import tables +import utils/twtstr + import chame/tags type @@ -35,7 +37,7 @@ const LabelableElements* = { func getInputTypeMap(): Table[string, InputType] = for i in InputType: let enumname = $InputType(i) - let tagname = enumname.split('_')[1..^1].join("_").toLowerAscii() + let tagname = enumname.split('_')[1..^1].join('_').toLowerAscii() result[tagname] = InputType(i) const inputTypeMap = getInputTypeMap() |