diff-renderer
diff-renderer copied to clipboard
closes #11 and updated dependencies
I had to update some outdated dependencies too
This is a complete rewrite. I don't even know how to review this. The idea of that minimalistic parser wasn't to support all html possibilities, but rather a small subset which is mostly needed for views.
In case of style tag, it opens a new language inside. I think you shouldn't even be using it in diff-renderer in order to keep its simplistic parser.
Second point was speed, it was that simple without any functions, just one loop for the performane reasons.
You even left a console statement inside.
I think its better you use a fork.
If you want a full html-parser I would suggest to look at some high quality solutions, they will by slower by factor 20 but at least with less bugs. Parsing html with a regex is a bad idea.
First of all I'm not done yet, second it's actually fast then your parser when dealing with non full page size html. Besides, if you actually read the code you would see that I don't use regex to parse html...
Did you try to run the bench I have there? What is it saying?
No I ran a jspref one
So how does it look like, got a link?
The test I have there is using the same lib as jsperf.com
I have added you as a collaborator, I think I don't have enough time to dive deep into that pr. I wil simply let you work on it.
Also you got access for publishing on npm as well