Giter Site home page Giter Site logo

Comments (8)

gwicke avatar gwicke commented on August 21, 2024

I am very much interested in this as well. I am using the tree builder with a custom (MediaWiki) tokenizer in a prototype I am working on currently. For now I modified the parser to take a tokenizer as an argument in parse(), but this is just a quick hack that ignores tokenizer modes completely.

Right now I am mostly working on the tokenizer, but might be able to put some effort into the interface later.

from html5.

aredridel avatar aredridel commented on August 21, 2024

Oh, sweet. I'm integrating the latest draft's tokenizer changes, which flattens the modes out into separate states. That should help move this along.

from html5.

papandreou avatar papandreou commented on August 21, 2024

@aredridel: Has that work been completed? I'm thinking about updating a project to the newest version of html5 and getting rid of the state transitions in my code.

from html5.

aredridel avatar aredridel commented on August 21, 2024

It has not, sadly! It's not trivial to get 100% accurate, since the HTML5 algorithms assume a document tree, and if you're not parsing fully, you don't get one. I need to rework for some of the latest spec changes, and that should simplify, since they've flattened some of the parser down into tokenizer states.

from html5.

dgreensp avatar dgreensp commented on August 21, 2024

I'm using just the tokenizer at the moment. I was able to pull it out, but it would be nice if it was explicitly separable.

from html5.

aredridel avatar aredridel commented on August 21, 2024

It's hard with the revision of the spec I was originally targeting, since the parser state feeds back into the tokenizer. With the latest revision, much if not all of this is flattened out. As I migrate toward the current parsing spec, it'll smooth that out.

from html5.

dgreensp avatar dgreensp commented on August 21, 2024

Sounds great. Thanks for writing this package, btw, it seems to be one of a kind in the JS world.

from html5.

aredridel avatar aredridel commented on August 21, 2024

I'm kinda surprised at how one of a kind it is, but it's needed!

from html5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.