From d9a3b1378075142e0dc0901a11570dde67310889 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 29 Oct 2023 09:31:00 -0400 Subject: [PATCH] Use raw_link instead of path for regular links. --- default_environment/templates/html/regular_link.dust | 2 +- src/context/regular_link.rs | 4 ++-- src/intermediate/regular_link.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/default_environment/templates/html/regular_link.dust b/default_environment/templates/html/regular_link.dust index ba4b98a..2566d30 100644 --- a/default_environment/templates/html/regular_link.dust +++ b/default_environment/templates/html/regular_link.dust @@ -1 +1 @@ -{#.children}{>object/}{/.children} +{#.children}{>object/}{/.children} diff --git a/src/context/regular_link.rs b/src/context/regular_link.rs index d245e0a..0cecb38 100644 --- a/src/context/regular_link.rs +++ b/src/context/regular_link.rs @@ -12,7 +12,7 @@ use super::RenderObject; #[serde(tag = "type")] #[serde(rename = "regular_link")] pub(crate) struct RenderRegularLink { - path: String, + raw_link: String, children: Vec, } @@ -37,7 +37,7 @@ impl RenderRegularLink { }; Ok(RenderRegularLink { - path: regular_link.path.clone(), + raw_link: regular_link.raw_link.clone(), children, }) } diff --git a/src/intermediate/regular_link.rs b/src/intermediate/regular_link.rs index 63080ea..af1413c 100644 --- a/src/intermediate/regular_link.rs +++ b/src/intermediate/regular_link.rs @@ -5,7 +5,7 @@ use super::IObject; #[derive(Debug)] pub(crate) struct IRegularLink { - pub(crate) path: String, + pub(crate) raw_link: String, pub(crate) children: Vec, } @@ -22,7 +22,7 @@ impl IRegularLink { ret }; Ok(IRegularLink { - path: original.path.as_ref().to_owned(), + raw_link: original.get_raw_link().into_owned(), children, }) }