Byron / pulldown-cmark-to-cmark

Convert pulldown-cmark Events back to the string they were parsed from
https://docs.rs/crate/pulldown-cmark-to-cmark
Apache License 2.0
43 stars 37 forks source link

References with the same content are output again and again #46

Closed gifnksm closed 2 years ago

gifnksm commented 2 years ago

Source:

* [foo]
* [foo]
* [foo]

[foo]: foo

Output

$ cargo run --example stupicat test.md
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/examples/stupicat test.md`
* [foo]
* [foo]
* [foo]

[foo]: foo
[foo]: foo
[foo]: foo

[foo]: foo should be output only once

Byron commented 2 years ago

Thanks a lot for sharing!

It's also an easy fix I believe so any help is appreciated.