Skip to content

Stabilize Document::to_dom_node #190

@silverpill

Description

@silverpill

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions