Add support for target links.
All checks were successful
format Build format has succeeded
build-natter Build build-natter has succeeded
rust-clippy Build rust-clippy has succeeded
rust-test Build rust-test has succeeded

This commit is contained in:
Tom Alexander
2023-12-23 22:12:05 -05:00
parent d2ea6b6a0f
commit 59a91331cc
3 changed files with 58 additions and 34 deletions

View File

@@ -14,9 +14,17 @@ pub(crate) struct RenderTarget {
post_blank: organic::types::PostBlank,
}
render!(RenderTarget, ITarget, original, _render_context, {
render!(RenderTarget, ITarget, original, render_context, {
let id = format!(
"{}{}",
render_context
.id_addition
.map(|id_addition| format!("sec{}.", id_addition))
.unwrap_or_default(),
original.id
);
Ok(RenderTarget {
id: original.id.clone(),
id,
post_blank: original.post_blank,
})
});