Comments (8)
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.
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.
@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.
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.
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.
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.
Sounds great. Thanks for writing this package, btw, it seems to be one of a kind in the JS world.
from html5.
I'm kinda surprised at how one of a kind it is, but it's needed!
from html5.
Related Issues (20)
- Stop overriding `array.last`
- can't load v0.4.0 HOT 6
- 0.3.16: </rt> and </rp> tags break the the tree builder HOT 4
- Lack of documentation. HOT 17
- Improve handler HOT 15
- The combination of contentHandler and lexicalHandler HOT 1
- Next release
- Add CHANGELOG.md HOT 4
- Register html5 on GitFund HOT 3
- jsdom should be a devDependency
- Update NPM module HOT 2
- Can I use this client-side? HOT 10
- SAX support? HOT 2
- LineNumber/ColumnNumber for errors? HOT 1
- Parser should detect "attribute value missing" error HOT 1
- this.lowercase_attr_name in global context HOT 16
- Why require('buffer') and parser._() for? HOT 3
- Why don't you use document.createElement / document.createElementNS ? HOT 4
- Zombie.js broken since 0.3.15 HOT 10
- Performance? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html5.