From 81affd4017870bd3f24a753bd4b937d86bd8da76 Mon Sep 17 00:00:00 2001 From: Qrius Date: Thu, 26 Sep 2024 00:11:06 +0200 Subject: Add macro that checks whether links are working or not --- src/macro_processor/macro_processor.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/macro_processor/macro_processor.rs') diff --git a/src/macro_processor/macro_processor.rs b/src/macro_processor/macro_processor.rs index 612d2c5..a9585bb 100644 --- a/src/macro_processor/macro_processor.rs +++ b/src/macro_processor/macro_processor.rs @@ -3,6 +3,8 @@ use std::collections::HashMap; use std::fs; use std::process::Command; +#[cfg(feature = "deadlinks")] +use crate::macro_processor::deadlinks::smp_builtin_wodl; // print only with debug_assertions macro_rules! dprint { ($($x:tt)*) => { @@ -672,6 +674,8 @@ impl MacroProcessor { String::from("html_from_markdown"), MacroType::Function(smp_builtin_html_from_markdown), ); + #[cfg(feature = "deadlinks")] + self.define_macro(String::from("wodl"), MacroType::Function(smp_builtin_wodl)); #[cfg(feature = "webring")] self.define_macro( String::from("webring_rss"), -- cgit v1.2.3