Skip to content
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

Stabilize Document::to_dom_node #190

Open
silverpill opened this issue Oct 30, 2023 · 0 comments
Open

Stabilize Document::to_dom_node #190

silverpill opened this issue Oct 30, 2023 · 0 comments

Comments

@silverpill
Copy link

silverpill commented Oct 30, 2023

Is your feature request related to a problem? Please describe.

Ability to post-process HTML documents is very useful, but currently requires using rustflags.

Describe the solution you'd like

I think it should be stabilized (it may remain feature-gated though).

Also, there seems to be an error in documentation:

ammonia/src/lib.rs

Lines 2831 to 2833 in 98c2eba

/// let mut buf = Vec::new();
/// serialize(&mut buf, &node, SerializeOpts::default())?;
/// let output = String::from_utf8(buf)?;

serialize requires SerializableHandle:

let mut buf = Vec::new();
let handle = SerializableHandle::from(node);
serialize(&mut buf, &handle, SerializeOpts::default())?;

Describe alternatives you've considered

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant