aboutsummaryrefslogtreecommitdiff
path: root/src/html.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/html.nim')
-rw-r--r--src/html.nim30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/html.nim b/src/html.nim
deleted file mode 100644
index 4ae5ee1..0000000
--- a/src/html.nim
+++ /dev/null
@@ -1,30 +0,0 @@
-type Html = object
- tags: seq[string]
-
-type Tag {.acyclic.} = object
- name: string
- text: string
- nested: seq[Tag]
-
-func parseHTML(html: string): Html = discard
-
-# Todo: revamp parsing: keep track of tags, entities, etc
-proc renderHTML*(html: string) =
- var
- in_angle = false
- in_body = false
-
- # _Why_ is it i, c and not c, i...
- for i, c in html:
- if c == '<':
- in_angle = true
- if html[i..i+4] == "<body":
- in_body = true
- elif c == '>':
- in_angle = false
- elif not in_angle and in_body and c in {char(32)..char(126), '\n'}:
- stdout.write(c)
-
-proc renderSource*(html: string) =
- for i, c in html:
- stdout.write(c)