Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-html

The HTML tokenizer and named character references from Ladybird's LibWeb, in luce-base.

A library written in luce-base. Latest release 0.5.1.

Install#

luc add dymokomi/luce-browser-html

Documentation#

luce-browser-html

The HTML tokenizer and named character references from Ladybird's LibWeb, in luce-base.

Part of the luce-browser family, a faithful port of Ladybird's LibWeb to luce-base; the design every porter follows is DESIGN.md.

ModuleContents
html_syntaxHTML tokenizer and entities

Depends on: luce-std, luce-browser-foundation.

Status

Ported (region r20, docs/regions/r20.md): the HTML tokenizer (HTMLTokenizer), its tokens (HTMLToken), the named character reference matcher (Entities) and the generated NamedCharacterReferences tables. docs/namemap.tsv maps every C++ name to its Luce name.

The tables are generated by tools/gen_entities, a Luce port of Ladybird's generate_libweb_html_named_character_references.py, from data/Entities.json:

luce-base build tools/gen_entities -o build/gen_entities
build/gen_entities data src/html_syntax

The port follows Ladybird at 47c82b38d0 (see PIN).

Testing

./test.sh type-checks every module with warnings as errors, runs the unit tests (Ladybird's TestHTMLTokenizer and cases pinned to the donor's behaviour), and regenerates the tables to compare them with the committed ones.

License

BSD-2-Clause, as Ladybird; see LICENSE.

Dependencies#

Versions#

0.5.1

Browse source · pack · commit 84970083dc59

SHA-256 64fb1d5bb0a09484f49e6e8b55f8280956d4289dce97527f3bdd487f4f268422

tools use collections.Buffer; dependencies name no version