Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-html

Source of release 0.5.1

0.5.1 / README.md

# 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](../luce-browser-engine/docs/DESIGN.md).

| Module | Contents |
| --- | --- |
| `html_syntax` | HTML 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`:

```sh
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`.