Compare commits
3 Commits
793789bdf2
...
f164838953
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f164838953 | ||
![]() |
fe3f2642fe | ||
![]() |
3d89492518 |
@ -1 +1 @@
|
|||||||
angle_link
|
!!!!!!!! angle_link
|
||||||
|
@ -1 +1 @@
|
|||||||
babel_call
|
!!!!!!!! babel_call
|
||||||
|
@ -1 +1 @@
|
|||||||
center_block
|
!!!!!!!! center_block
|
||||||
|
@ -1 +1 @@
|
|||||||
citation
|
!!!!!!!! citation
|
||||||
|
@ -1 +1 @@
|
|||||||
citation_reference
|
!!!!!!!! citation_reference
|
||||||
|
@ -1 +1 @@
|
|||||||
clock
|
!!!!!!!! clock
|
||||||
|
@ -1 +1 @@
|
|||||||
diary_sexp
|
!!!!!!!! diary_sexp
|
||||||
|
@ -1 +1 @@
|
|||||||
drawer
|
!!!!!!!! drawer
|
||||||
|
@ -1 +1 @@
|
|||||||
dynamic_block
|
!!!!!!!! dynamic_block
|
||||||
|
@ -1 +1 @@
|
|||||||
example_block
|
!!!!!!!! example_block
|
||||||
|
@ -1 +1 @@
|
|||||||
export_block
|
!!!!!!!! export_block
|
||||||
|
@ -1 +1 @@
|
|||||||
export_snippet
|
!!!!!!!! export_snippet
|
||||||
|
@ -1 +1 @@
|
|||||||
fixed_width_area
|
!!!!!!!! fixed_width_area
|
||||||
|
@ -1 +1 @@
|
|||||||
footnote_definition
|
!!!!!!!! footnote_definition
|
||||||
|
@ -1 +1 @@
|
|||||||
footnote_reference
|
!!!!!!!! footnote_reference
|
||||||
|
@ -1 +1 @@
|
|||||||
global_settings
|
!!!!!!!! global_settings
|
||||||
|
@ -1 +1 @@
|
|||||||
horizontal_rule
|
!!!!!!!! horizontal_rule
|
||||||
|
@ -1 +1 @@
|
|||||||
inline_babel_call
|
!!!!!!!! inline_babel_call
|
||||||
|
@ -1 +1 @@
|
|||||||
inline_source_block
|
!!!!!!!! inline_source_block
|
||||||
|
@ -1 +1 @@
|
|||||||
latex_environment
|
!!!!!!!! latex_environment
|
||||||
|
@ -1 +1 @@
|
|||||||
latex_fragment
|
!!!!!!!! latex_fragment
|
||||||
|
@ -27,4 +27,5 @@
|
|||||||
{@eq value="superscript"}{>superscript/}{/eq}
|
{@eq value="superscript"}{>superscript/}{/eq}
|
||||||
{@eq value="timestamp"}{>timestamp/}{/eq}
|
{@eq value="timestamp"}{>timestamp/}{/eq}
|
||||||
{@none}{!TODO: make this panic!}ERROR: Unrecognized type {.type}.{/none}
|
{@none}{!TODO: make this panic!}ERROR: Unrecognized type {.type}.{/none}
|
||||||
{/select}
|
{/select}{~s}
|
||||||
|
{! TODO: Maybe the final space should be conditional on end blank in the org source !}
|
||||||
|
@ -1 +1 @@
|
|||||||
org_macro
|
!!!!!!!! org_macro
|
||||||
|
@ -1 +1 @@
|
|||||||
plain_link
|
!!!!!!!! plain_link
|
||||||
|
@ -1 +1 @@
|
|||||||
planning
|
!!!!!!!! planning
|
||||||
|
@ -1 +1 @@
|
|||||||
property_drawer
|
!!!!!!!! property_drawer
|
||||||
|
@ -1 +1 @@
|
|||||||
radio_link
|
!!!!!!!! radio_link
|
||||||
|
@ -1 +1 @@
|
|||||||
radio_target
|
!!!!!!!! radio_target
|
||||||
|
@ -1 +1 @@
|
|||||||
regular_link
|
<a href="{path}">{#.children}{>object/}{/.children}</a>
|
||||||
|
@ -1 +1 @@
|
|||||||
special_block
|
!!!!!!!! special_block
|
||||||
|
@ -1 +1 @@
|
|||||||
src_block
|
!!!!!!!! src_block
|
||||||
|
@ -1 +1 @@
|
|||||||
statistics_cookie
|
!!!!!!!! statistics_cookie
|
||||||
|
@ -1 +1 @@
|
|||||||
subscript
|
!!!!!!!! subscript
|
||||||
|
@ -1 +1 @@
|
|||||||
superscript
|
!!!!!!!! superscript
|
||||||
|
@ -1 +1 @@
|
|||||||
table
|
!!!!!!!! table
|
||||||
|
@ -1 +1 @@
|
|||||||
timestamp
|
!!!!!!!! timestamp
|
||||||
|
@ -1 +1 @@
|
|||||||
verse_block
|
!!!!!!!! verse_block
|
||||||
|
@ -6,18 +6,39 @@ use crate::config::Config;
|
|||||||
use crate::error::CustomError;
|
use crate::error::CustomError;
|
||||||
use crate::intermediate::IRegularLink;
|
use crate::intermediate::IRegularLink;
|
||||||
|
|
||||||
|
use super::RenderObject;
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
#[serde(tag = "type")]
|
#[serde(tag = "type")]
|
||||||
#[serde(rename = "regular_link")]
|
#[serde(rename = "regular_link")]
|
||||||
pub(crate) struct RenderRegularLink {}
|
pub(crate) struct RenderRegularLink {
|
||||||
|
path: String,
|
||||||
|
children: Vec<RenderObject>,
|
||||||
|
}
|
||||||
|
|
||||||
impl RenderRegularLink {
|
impl RenderRegularLink {
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
config: &Config,
|
config: &Config,
|
||||||
output_directory: &Path,
|
output_directory: &Path,
|
||||||
output_file: &Path,
|
output_file: &Path,
|
||||||
comment: &IRegularLink,
|
regular_link: &IRegularLink,
|
||||||
) -> Result<RenderRegularLink, CustomError> {
|
) -> Result<RenderRegularLink, CustomError> {
|
||||||
Ok(RenderRegularLink {})
|
let children = {
|
||||||
|
let mut ret = Vec::new();
|
||||||
|
for obj in regular_link.children.iter() {
|
||||||
|
ret.push(RenderObject::new(
|
||||||
|
config,
|
||||||
|
&output_directory,
|
||||||
|
&output_file,
|
||||||
|
obj,
|
||||||
|
)?);
|
||||||
|
}
|
||||||
|
ret
|
||||||
|
};
|
||||||
|
|
||||||
|
Ok(RenderRegularLink {
|
||||||
|
path: regular_link.path.clone(),
|
||||||
|
children,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,29 @@
|
|||||||
use crate::error::CustomError;
|
use crate::error::CustomError;
|
||||||
|
|
||||||
use super::registry::Registry;
|
use super::registry::Registry;
|
||||||
|
use super::IObject;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) struct IRegularLink {}
|
pub(crate) struct IRegularLink {
|
||||||
|
pub(crate) path: String,
|
||||||
|
pub(crate) children: Vec<IObject>,
|
||||||
|
}
|
||||||
|
|
||||||
impl IRegularLink {
|
impl IRegularLink {
|
||||||
pub(crate) async fn new<'parse>(
|
pub(crate) async fn new<'parse>(
|
||||||
registry: &mut Registry<'parse>,
|
registry: &mut Registry<'parse>,
|
||||||
original: &organic::types::RegularLink<'parse>,
|
original: &organic::types::RegularLink<'parse>,
|
||||||
) -> Result<IRegularLink, CustomError> {
|
) -> Result<IRegularLink, CustomError> {
|
||||||
Ok(IRegularLink {})
|
let children = {
|
||||||
|
let mut ret = Vec::new();
|
||||||
|
for obj in original.children.iter() {
|
||||||
|
ret.push(IObject::new(registry, obj).await?);
|
||||||
|
}
|
||||||
|
ret
|
||||||
|
};
|
||||||
|
Ok(IRegularLink {
|
||||||
|
path: original.path.as_ref().to_owned(),
|
||||||
|
children,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user