Removing else-if block and replacing with a standalone if block to improve readability.

This commit is contained in:
Jason Thompson 2024-08-05 23:20:14 -04:00
parent 6373f19343
commit 45de00ebdc

View File

@ -65,7 +65,7 @@ pub enum CommentStrategy {
Remove, 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 /// 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 /// prohibits comments from being exported but leaves them untouched in the original files
pub fn remove_obsidian_comments( pub fn remove_obsidian_comments(
@ -87,7 +87,9 @@ pub fn remove_obsidian_comments(
output.pop(); //Inside block comment so remove output.pop(); //Inside block comment so remove
} }
continue; continue;
} else if inside_codeblock { }
if inside_codeblock {
continue; //Skip anything inside codeblocks continue; //Skip anything inside codeblocks
} }