From a8ab8a8da13b7d3e8a78212058cf8e885a571771 Mon Sep 17 00:00:00 2001 From: harryob <55142896+harryob@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:10:22 +0000 Subject: [PATCH] fix internal link finding for database_query, atom_movable --- tools/od_ref_bot/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/od_ref_bot/src/main.rs b/tools/od_ref_bot/src/main.rs index 4d0b03d61..9b08676f4 100644 --- a/tools/od_ref_bot/src/main.rs +++ b/tools/od_ref_bot/src/main.rs @@ -264,7 +264,7 @@ fn format_body(body: &str, data: &Data) -> String { let mut replaced_body = body.to_string(); let link_finder_regex = - Regex::new(r##"\{\{ *?([a-zA-Z]*)\(((var|proc)="([a-zA-Z]*?)")? ?\).*?\}\}"##).unwrap(); + Regex::new(r##"\{\{ *?([a-zA-Z_]*)\(((var|proc)="([a-zA-Z]*?)")? ?\).*?\}\}"##).unwrap(); for capture in link_finder_regex.captures_iter(body) { let original = capture.get(0).unwrap().as_str(); @@ -310,7 +310,7 @@ fn format_body(body: &str, data: &Data) -> String { new_body = tag_cleaner_regex.replace_all(&new_body, "").to_string(); new_body = new_body.replace("```dm", "```js"); - new_body.replace("\n\n", "") + new_body.replace("\n\n\n", "\n") } /// Converts the internal Zola page structure into something we can link to.