-
Notifications
You must be signed in to change notification settings - Fork 236
Xhtml5ever #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xhtml5ever #268
Conversation
- Update usage in code, examples and tests - Update Cargo.toml of xml5ever and html5ever and increase version - Update CHANGELOG.md
This commit contains: - Extracting the file itself - Extracting build.rs details from html5ever and xml5ever into markup5ever - Updating markup5ever dependencies - Updating xml/html 5ever files to use markup5ever
- Removes all unused script files and pulls them into workspace scripts folder
- Remove unneeded licenses and configuration - Add whitespace to Cargo.toml
- Moves `TreeSink` into markup5ever, and applies to xhtml5ever. - Renames `QName` from xml5ever to `QualName`. - Adds `prefix` field to `QualName`. - Moves `Attributes` into markup5ever
Possible issues:
|
Wow, thanks a lot! I’ll look at the diffs later but based just on the commit messages this looks great. A couple notes:
As I’m mentioned I don’t think this is important. When an application wants to support both XML and HTML it will most likely use each parser as a whole, not the tokenizer or the tree builder individually. So while it is useful to make
There is stuff to do here, but I think it’s mostly independent of what’s in this PR at this point. So don’t worry about it :)
I think this should be a range: |
My grep-fu failed me on first attempt. I had to rebase some Copyright fixes. I apologize for the inconvenience. Thank you for kind words. I hope reviewing it won't be too difficult. BTW I won't be near computer for a few days, so I might take longer to respond/fix. |
That’s fine. We’re not in a hurry with this, and this repository doesn’t see much activity at the moment so this will hopefully not bitrot. However, if you prefer, I can take over the PR and fix up some minor things and land it in your absence. In that case I have one question (so far): In # This is a hack until cargo doc lands on stable
cargo doc -p html5ever
cargo doc -p xml5ever What do you mean, “until cargo doc lands on stable”? |
Yeah, I forgot to fix that comment. I meant a hack until EDIT: Hmm. It seems my rustc was old, the command should work on stable now. |
Re Reviewed 94 of 98 files at r1, 1 of 1 files at r2, 3 of 3 files at r3, 1 of 1 files at r4, 2 of 2 files at r5, 9 of 9 files at r6, 13 of 13 files at r7, 14 of 14 files at r8, 11 of 12 files at r9, 8 of 8 files at r10, 5 of 5 files at r11, 26 of 26 files at r12, 10 of 10 files at r13, 7 of 7 files at r14, 56 of 56 files at r15. markup5ever/Cargo.toml, line 27 at r8 (raw file):
It looks like markup5ever/lib.rs, line 20 at r12 (raw file):
Why not scripts/travis-build.sh, line 25 at r10 (raw file):
What do you mean, “until cargo doc lands on stable”? xml5ever/Cargo.toml, line 21 at r4 (raw file): This issue is "plugins not working in doc tests". Since we’re not using compile plugins anymore this is no longer relevant. And the issue is fixed anyway. If there is any doctest in either library we should enable them back. If not, we should keep xml5ever/src/rcdom.rs, line 43 at r12 (raw file):
While we’re touching this, let’s used a struct-like variant to name the field: xml5ever/src/rcdom.rs, line 110 at r12 (raw file):
Let’s remove this and use xml5ever/tests/tokenizer.rs, line 1 at r5 (raw file):
I think this can be removed as well. Comments from Reviewable |
scripts/travis-build.sh, line 25 at r10 (raw file): Previously, SimonSapin (Simon Sapin) wrote…
It's an error on my part, caused by old rustc. Comments from Reviewable |
markup5ever/Cargo.toml, line 27 at r8 (raw file): Previously, SimonSapin (Simon Sapin) wrote…
Hm, I was under the impression, that it was used, since no warning was issued. But you are right. Comments from Reviewable |
xml5ever/Cargo.toml, line 21 at r4 (raw file): Previously, SimonSapin (Simon Sapin) wrote…
Enable this in html5ever, as well I assume? Comments from Reviewable |
- After enabling ALL tests there were some issues - Also using `$ crate` instead `::markup5ever` - Removed unused crate
Reviewed 2 of 98 files at r1, 3 of 9 files at r6, 1 of 8 files at r10, 1 of 10 files at r13, 1 of 1 files at r16, 6 of 6 files at r17, 2 of 2 files at r18, 2 of 2 files at r19. markup5ever/interface/mod.rs, line 139 at r17 (raw file):
Comments from Reviewable |
@SimonSapin. What to do about |
We don’t actually want to check that the prefix is None.
This PR looks good, thanks! I added more stuff on top at: Ygg01#1. That includes taking care of |
The result shouldn’t change if the attributed is changed in the meantime.
markup5ever followups
@bors-servo r=SimonSapin,Ygg01 |
📌 Commit 50bcef5 has been approved by |
Xhtml5ever Ok, this is a large one. Fixes #266, fixes #261, fixes #210. It moves html5ever into separate folder, renames html5ever macros markup5ever and stores common code there. Here is short summary of what I know is and isn't done. - [x] Make every crate in the repo use a single workspace - [x] Make sure Travis-CI is running every test - [x] Rename the the html5ever_atoms crate to markup5ever and update html5ever and xml5ever to use it. - [x] Increment version numbers - [x] Make it so that users of either html5ever or xml5ever don’t need to have an explicit dependency to markup5ever - [x] Export QualName #210 - [x] let markup5ever generate entities.json #261 - [ ] **Move TokenSink to markup5ever** - [x] Move TreeSink to markup5ever - [x] Move BufferQueue to markup5ever - [x] Move SmallCharSet to markup5ever - [ ] **Deal with driver.rs** <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/html5ever/268) <!-- Reviewable:end -->
☀️ Test successful - status-travis |
Review status: 49 of 90 files reviewed at latest revision, 2 unresolved discussions. xml5ever/src/rcdom.rs, line 110 at r12 (raw file): Previously, SimonSapin (Simon Sapin) wrote…
AFAIK no need for support. Comments from Reviewable |
Ok, this is a large one.
Fixes #266, fixes #261, fixes #210.
It moves html5ever into separate folder, renames html5ever macros markup5ever and stores common code there.
Here is short summary of what I know is and isn't done.
This change is