test.rs

 1use indoc::indoc;
 2use rustdoc_to_markdown::convert_rustdoc_to_markdown;
 3
 4pub fn main() {
 5    let html = indoc! {"
 6        <html>
 7            <body>
 8                <h1>Hello World</h1>
 9                <p>
10                    Here is some content.
11                </p>
12                <h2>Some items</h2>
13                <ul>
14                    <li>One</li>
15                    <li>Two</li>
16                    <li>Three</li>
17                </ul>
18            </body>
19        </html>
20    "};
21    // To test this out with some real input, try this:
22    //
23    // ```
24    // let html = include_str!("/path/to/zed/target/doc/gpui/index.html");
25    // ```
26    let markdown = convert_rustdoc_to_markdown(html.as_bytes()).unwrap();
27
28    println!("{markdown}");
29}