tokio-rs / website

Website for the Tokio project
https://tokio.rs
MIT License
227 stars 328 forks source link

fix: `# if true { return }` is not hidden in html code block #751

Closed PeterD1524 closed 4 months ago

PeterD1524 commented 4 months ago

# if true { return } is shown in the code block of the topic page Unit Testing:

Based on https://github.com/tokio-rs/website/pull/735, # if true { return } was used to let doc tests pass. The original function to remove # lines does not cover all cases. This PR fixes that function to match what librustdoc does.

Another forgotten # on the same page:

Also in blog New Timer implementation:

These # lines will be removed by the fixed function.