diff --git a/CHANGELOG.md b/CHANGELOG.md index 886d2e2..9b033e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ SPDX-License-Identifier: MIT - Add interactive tui viewer that adds support for following links from the documentation. - Add tests for Rust 1.47.0. +- Remove Notable Traits section from definitions. ## v0.3.0 (2020-09-11) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 25fee96..830728a 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -186,6 +186,12 @@ fn node_to_text(node: &kuchiki::NodeRef) -> String { } fn push_node_to_text(s: &mut String, node: &kuchiki::NodeRef) { + if node.has_class("notable-traits") { + // The notable-traits element lists informations about types in a code block. But we only + // want to extract the code, so we skip this element. + return; + } + let is_docblock = node.has_class("docblock"); let add_newline = if node.is_element(&local_name!("br")) {