Skip to content

Commit

Permalink
web-html: General bug fixes and code simplification.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Mar 9, 2024
1 parent 9bb326f commit 63e62f9
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 158 deletions.
9 changes: 4 additions & 5 deletions src/web/web-html/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#include <web-html/tokenizer.h>

Res<> entryPoint(Sys::Ctx &) {
auto file = try$(Sys::File::open("bundle://web-html-cli/exemple.html"_url));
auto file = try$(Sys::File::open("bundle://web-html-cli/index.html"_url));

auto buf = try$(Io::readAllUtf8(file));

Sys::println("Orginal Source:");
Sys::println("{}", buf);
// Sys::println("Orginal Source:");
// Sys::println("{}", buf);

struct : public Web::Html::Sink {
void accept(Web::Html::Token const &token) override {
Expand All @@ -20,9 +20,8 @@ Res<> entryPoint(Sys::Ctx &) {
Sys::println("Tokens:");
Web::Html::Tokenizer tokenizer{sink};

for (auto r : iterRunes(buf)) {
for (auto r : iterRunes(buf))
tokenizer.consume(r);
}

tokenizer.consume(-1, true);

Expand Down
28 changes: 0 additions & 28 deletions src/web/web-html/entites.c

This file was deleted.

20 changes: 0 additions & 20 deletions src/web/web-html/entities.h

This file was deleted.

Loading

0 comments on commit 63e62f9

Please sign in to comment.