chore: Fix several style lints (#17488)
It's not comprehensive enough to start linting on `style` group, but hey, it's a start. Release Notes: - N/A
This commit is contained in:
parent
93249fc82b
commit
e6c1c51b37
361 changed files with 3530 additions and 3587 deletions
|
@ -54,13 +54,8 @@ impl HandleTag for WikipediaInfoboxHandler {
|
|||
tag: &HtmlElement,
|
||||
_writer: &mut MarkdownWriter,
|
||||
) -> StartTagOutcome {
|
||||
match tag.tag() {
|
||||
"table" => {
|
||||
if tag.has_class("infobox") {
|
||||
return StartTagOutcome::Skip;
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
if tag.tag() == "table" && tag.has_class("infobox") {
|
||||
return StartTagOutcome::Skip;
|
||||
}
|
||||
|
||||
StartTagOutcome::Continue
|
||||
|
@ -77,12 +72,15 @@ impl WikipediaCodeHandler {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for WikipediaCodeHandler {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl HandleTag for WikipediaCodeHandler {
|
||||
fn should_handle(&self, tag: &str) -> bool {
|
||||
match tag {
|
||||
"div" | "pre" | "code" => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(tag, "div" | "pre" | "code")
|
||||
}
|
||||
|
||||
fn handle_tag_start(
|
||||
|
@ -134,7 +132,7 @@ impl HandleTag for WikipediaCodeHandler {
|
|||
|
||||
fn handle_text(&mut self, text: &str, writer: &mut MarkdownWriter) -> HandlerOutcome {
|
||||
if writer.is_inside("pre") {
|
||||
writer.push_str(&text);
|
||||
writer.push_str(text);
|
||||
return HandlerOutcome::Handled;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue