From 45de00ebdced42f1927f3fabdeb662fd5d9f4463 Mon Sep 17 00:00:00 2001 From: Jason Thompson Date: Mon, 5 Aug 2024 23:20:14 -0400 Subject: [PATCH] Removing else-if block and replacing with a standalone if block to improve readability. --- src/postprocessors.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/postprocessors.rs b/src/postprocessors.rs index df392a9..e36e872 100644 --- a/src/postprocessors.rs +++ b/src/postprocessors.rs @@ -65,7 +65,7 @@ pub enum CommentStrategy { Remove, } -#[allow(clippy::else_if_without_else, clippy::arithmetic_side_effects)] +#[allow(clippy::arithmetic_side_effects)] /// This postprocessor removes all Obsidian comments from a file excluding codeblocks. Enabling this /// prohibits comments from being exported but leaves them untouched in the original files pub fn remove_obsidian_comments( @@ -87,7 +87,9 @@ pub fn remove_obsidian_comments( output.pop(); //Inside block comment so remove } continue; - } else if inside_codeblock { + } + + if inside_codeblock { continue; //Skip anything inside codeblocks }