diff options
| author | bors <bors@rust-lang.org> | 2024-10-18 19:24:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-18 19:24:16 +0000 |
| commit | 6a795887c4d05bccc59951788563b8b06601409d (patch) | |
| tree | c700cecd21309045117ab6e48d988a10f11e7ddf /tests | |
| parent | 47effe4f68a01fef03fda57023427011fd14c5e5 (diff) | |
| parent | da19d471479b819968af2a89b9c39d9247f64060 (diff) | |
| download | rust-6a795887c4d05bccc59951788563b8b06601409d.tar.gz rust-6a795887c4d05bccc59951788563b8b06601409d.zip | |
Auto merge of #13539 - GuillaumeGomez:allow-no-js, r=Alexendoo
Allow to go through clippy lints page without javascript Fixes #13536. This is the follow-up of https://github.com/rust-lang/rust-clippy/pull/13269. This PR makes it possible to expand/collapse lints (individually) without JS. To achieve this result, there are two ways: 1. Use `details` and `summary` tags. Problem with this approach is that the web browser search may open the `details` tags automatically if content matching it is inside. From a previous discussion with `@Alexendoo,` it seems to not be a desired behaviour. 2. Use a little trick where you use a `label` and a checkbox where the checkbox is in fact hidden. Then it's just a matter of CSS. r? `@Alexendoo` changelog: Allow to go through clippy lints page without JS
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/compile-test.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 5774e20e0be..b8e0413e97b 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -396,7 +396,8 @@ struct Renderer<'a> { impl Renderer<'_> { fn markdown(input: &str) -> Safe<String> { - let parser = Parser::new_ext(input, Options::all()); + let input = clippy_config::sanitize_explanation(input); + let parser = Parser::new_ext(&input, Options::all()); let mut html_output = String::new(); html::push_html(&mut html_output, parser); // Oh deer, what a hack :O |
