Use raw_link instead of path for regular links.
This commit is contained in:
parent
8d9a50226a
commit
d9a3b13780
@ -1 +1 @@
|
||||
<a href="{path}">{#.children}{>object/}{/.children}</a>
|
||||
<a href="{.raw_link}">{#.children}{>object/}{/.children}</a>
|
||||
|
@ -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<RenderObject>,
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ impl RenderRegularLink {
|
||||
};
|
||||
|
||||
Ok(RenderRegularLink {
|
||||
path: regular_link.path.clone(),
|
||||
raw_link: regular_link.raw_link.clone(),
|
||||
children,
|
||||
})
|
||||
}
|
||||
|
@ -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<IObject>,
|
||||
}
|
||||
|
||||
@ -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,
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user