servo / servo/html5ever

Improving h5e/x5e extension story

Open
#325 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.6k
Forks
288
Avg merge
2d 22h
Merged PRs (30d)
8

Description

Hi, for issue #323 I was writing a small TokenSink implementation. And to be honest, it took me good half-hour, to hour for that simplistic implementation.

I think what we might need is better docs, and possibly some convenience method. One pain point was adding following part:

     let _ = tok.feed(&mut input);
     tok.end();

Do we need a different tok.feed and tok.end() methods? Can they be let _ = tok.exec(&mut input)?

One thing that also irked me, was that I couldn't have implemented was to have tokenizer abort when encountering anything that isn't Text token?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TokenSink implementation described in issue #323 and review the tok.feed(&mut input) and tok.end() calls shown here. Determine whether the requested convenience execution method, improved documentation, and abort behavior for non-Text tokens can be specified consistently; done requires an agreed API and documented behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.