From a13279ea39445ef2fc22265a5bf0578f7bdfba36 Mon Sep 17 00:00:00 2001 From: Michael Clayton Date: Wed, 9 Feb 2022 05:02:14 -0500 Subject: [PATCH] ignore links to '#' (#1756) --- components/rendering/src/markdown.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/rendering/src/markdown.rs b/components/rendering/src/markdown.rs index 65ceba621b..a323a0ac7c 100644 --- a/components/rendering/src/markdown.rs +++ b/components/rendering/src/markdown.rs @@ -96,6 +96,8 @@ fn fix_link( if is_external_link(link) { external_links.push(link.to_owned()); link.to_owned() + } else if link == "#" { + link.to_string() } else if link.starts_with("#") { // local anchor without the internal zola path if let Some(current_path) = context.current_page_path {