Auto merge of #1751 - smarnach:clean-up-render, r=sgrif
Auto merge of #1751 - smarnach:clean-up-render, r=sgrif

Clean up README rendering code.

When browsing the code, I noticed that the HTML sanitzation code looked a bit messy, so I attempted to clean it up. This patch should not change the functionality in any way, but the new code may be easier to read and understand – not sure whether that's enough for you to spend time reviewing this.

I also wonder whether there is an explicit list of allowed tags in the code. The [defaults in the `ammonia` crate](https://docs.rs/ammonia/2.1.1/src/ammonia/lib.rs.html#260-269) look quite reasonable to me (we'd only need to add `input` for check boxes).

rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io