-
Notifications
You must be signed in to change notification settings - Fork 244
Assorted documentation #328
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great improvement!
markup5ever/serialize.rs
Outdated
|
||
use QualName; | ||
use std::io; | ||
|
||
//§ serializing-html-fragments | ||
/// Used as a parameter to `serialize`, telling it if we want to skip the parent. | ||
/// TODO check: Currently the parameter to `ChildrenOnly` is unused. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used by the HTML serializer code: https://github.com/derekdreery/html5ever/blob/30891d283147bfa815d1ae47694ff97761b2f150/html5ever/src/serialize/mod.rs#L77
markup5ever/serialize.rs
Outdated
IncludeNode, | ||
/// Only serialize the children of the node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Only serialize the children of the node, treating any provided qualified name as the parent while serializing.
markup5ever/util/buffer_queue.rs
Outdated
@@ -123,6 +176,29 @@ impl BufferQueue { | |||
// If so, consume them and return Some(true). | |||
// If they do not match, return Some(false). | |||
// If not enough characters are available to know, return None. | |||
/// Consume bytes matching the pattern, using a custom comparison function `eq`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the existing comments, since the new ones are more thorough.
I've addressed the issues you've raised. You're welcome to merge this, or if you leave it open I can continue adding documentation to it. Or if you would rather I'll start a new PR with any other documentation I do. I don't mind either way. |
Let's merge the changes that exist right now so others can benefit. |
📌 Commit de94da4 has been approved by |
Assorted documentation I'm just trying to learn how this lib works, and I'm looking at source to work it out. Hopefully if I doc as I go, others that come after me will benefit :)
☀️ Test successful - status-travis |
I'm just trying to learn how this lib works, and I'm looking at source to work it out. Hopefully if I doc as I go, others that come after me will benefit :)