From b64e737671b5d251a15bfec76f57d76d691d396f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 24 Apr 2023 22:03:15 +0300 Subject: feat: implement the brokenlinks directive Sponsored-by: author --- src/directive/brokenlinks.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/directive/brokenlinks.rs b/src/directive/brokenlinks.rs index aa135ec..11fdb80 100644 --- a/src/directive/brokenlinks.rs +++ b/src/directive/brokenlinks.rs @@ -2,7 +2,6 @@ use crate::directive::{DirectiveError, DirectiveImplementation, Processed}; use crate::page::PageMeta; use crate::site::Site; use crate::wikitext::ParsedDirective; -use log::warn; #[derive(Debug, Default, Eq, PartialEq)] pub struct Brokenlinks {} @@ -16,11 +15,9 @@ impl DirectiveImplementation for Brokenlinks { Self::default() } - fn process(&self, _site: &Site, meta: &mut PageMeta) -> Result { - warn!( - "page {} uses unimplemented brokenlinks", - meta.path().display() - ); - Err(DirectiveError::UnimplementedDirective("brokenlinks".into())) + fn process(&self, _site: &Site, _meta: &mut PageMeta) -> Result { + // We don't allow broken links, but we want to allow the + // directive, so this is very simple. + Ok(Processed::Markdown("".into())) } } -- cgit v1.2.1