mirror of
https://github.com/getzola/zola
synced 2025-01-06 00:48:47 +00:00
ignore links to '#' (#1756)
This commit is contained in:
parent
821fa38bc1
commit
a13279ea39
1 changed files with 2 additions and 0 deletions
|
@ -96,6 +96,8 @@ fn fix_link(
|
||||||
if is_external_link(link) {
|
if is_external_link(link) {
|
||||||
external_links.push(link.to_owned());
|
external_links.push(link.to_owned());
|
||||||
link.to_owned()
|
link.to_owned()
|
||||||
|
} else if link == "#" {
|
||||||
|
link.to_string()
|
||||||
} else if link.starts_with("#") {
|
} else if link.starts_with("#") {
|
||||||
// local anchor without the internal zola path
|
// local anchor without the internal zola path
|
||||||
if let Some(current_path) = context.current_page_path {
|
if let Some(current_path) = context.current_page_path {
|
||||||
|
|
Loading…
Reference in a new issue