diff options
Diffstat (limited to 'src/html/entity.nim')
-rw-r--r-- | src/html/entity.nim | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/html/entity.nim b/src/html/entity.nim deleted file mode 100644 index f2f55277..00000000 --- a/src/html/entity.nim +++ /dev/null @@ -1,17 +0,0 @@ -import json - -import utils/radixtree - -const entity = staticRead"res/entity.json" -proc genEntityMap(data: seq[tuple[a: cstring, b: cstring]]): RadixNode[string] = - result = newRadixTree[string]() - for pair in data: - result[$pair.a] = $pair.b - -proc genEntityTable(): seq[tuple[a: cstring, b: cstring]] = - let entityJson = parseJson(entity) - - for k, v in entityJson: - result.add((cstring(k.substr(1)), cstring(v{"characters"}.getStr()))) -const entityTable = genEntityTable() -let entityMap* = genEntityMap(entityTable) |