Compare commits

..

No commits in common. "f164838953dfba4710de2fb9b5a40bc4ba48c751" and "793789bdf2da18c0198444209a05b4a11d160769" have entirely different histories.

39 changed files with 42 additions and 78 deletions

View File

@ -1 +1 @@
!!!!!!!! angle_link
angle_link

View File

@ -1 +1 @@
!!!!!!!! babel_call
babel_call

View File

@ -1 +1 @@
!!!!!!!! center_block
center_block

View File

@ -1 +1 @@
!!!!!!!! citation
citation

View File

@ -1 +1 @@
!!!!!!!! citation_reference
citation_reference

View File

@ -1 +1 @@
!!!!!!!! clock
clock

View File

@ -1 +1 @@
!!!!!!!! diary_sexp
diary_sexp

View File

@ -1 +1 @@
!!!!!!!! drawer
drawer

View File

@ -1 +1 @@
!!!!!!!! dynamic_block
dynamic_block

View File

@ -1 +1 @@
!!!!!!!! example_block
example_block

View File

@ -1 +1 @@
!!!!!!!! export_block
export_block

View File

@ -1 +1 @@
!!!!!!!! export_snippet
export_snippet

View File

@ -1 +1 @@
!!!!!!!! fixed_width_area
fixed_width_area

View File

@ -1 +1 @@
!!!!!!!! footnote_definition
footnote_definition

View File

@ -1 +1 @@
!!!!!!!! footnote_reference
footnote_reference

View File

@ -1 +1 @@
!!!!!!!! global_settings
global_settings

View File

@ -1 +1 @@
!!!!!!!! horizontal_rule
horizontal_rule

View File

@ -1 +1 @@
!!!!!!!! inline_babel_call
inline_babel_call

View File

@ -1 +1 @@
!!!!!!!! inline_source_block
inline_source_block

View File

@ -1 +1 @@
!!!!!!!! latex_environment
latex_environment

View File

@ -1 +1 @@
!!!!!!!! latex_fragment
latex_fragment

View File

@ -27,5 +27,4 @@
{@eq value="superscript"}{>superscript/}{/eq}
{@eq value="timestamp"}{>timestamp/}{/eq}
{@none}{!TODO: make this panic!}ERROR: Unrecognized type {.type}.{/none}
{/select}{~s}
{! TODO: Maybe the final space should be conditional on end blank in the org source !}
{/select}

View File

@ -1 +1 @@
!!!!!!!! org_macro
org_macro

View File

@ -1 +1 @@
!!!!!!!! plain_link
plain_link

View File

@ -1 +1 @@
!!!!!!!! planning
planning

View File

@ -1 +1 @@
!!!!!!!! property_drawer
property_drawer

View File

@ -1 +1 @@
!!!!!!!! radio_link
radio_link

View File

@ -1 +1 @@
!!!!!!!! radio_target
radio_target

View File

@ -1 +1 @@
<a href="{path}">{#.children}{>object/}{/.children}</a>
regular_link

View File

@ -1 +1 @@
!!!!!!!! special_block
special_block

View File

@ -1 +1 @@
!!!!!!!! src_block
src_block

View File

@ -1 +1 @@
!!!!!!!! statistics_cookie
statistics_cookie

View File

@ -1 +1 @@
!!!!!!!! subscript
subscript

View File

@ -1 +1 @@
!!!!!!!! superscript
superscript

View File

@ -1 +1 @@
!!!!!!!! table
table

View File

@ -1 +1 @@
!!!!!!!! timestamp
timestamp

View File

@ -1 +1 @@
!!!!!!!! verse_block
verse_block

View File

@ -6,39 +6,18 @@ use crate::config::Config;
use crate::error::CustomError;
use crate::intermediate::IRegularLink;
use super::RenderObject;
#[derive(Debug, Serialize)]
#[serde(tag = "type")]
#[serde(rename = "regular_link")]
pub(crate) struct RenderRegularLink {
path: String,
children: Vec<RenderObject>,
}
pub(crate) struct RenderRegularLink {}
impl RenderRegularLink {
pub(crate) fn new(
config: &Config,
output_directory: &Path,
output_file: &Path,
regular_link: &IRegularLink,
comment: &IRegularLink,
) -> Result<RenderRegularLink, CustomError> {
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,
})
Ok(RenderRegularLink {})
}
}

View File

@ -1,29 +1,15 @@
use crate::error::CustomError;
use super::registry::Registry;
use super::IObject;
#[derive(Debug)]
pub(crate) struct IRegularLink {
pub(crate) path: String,
pub(crate) children: Vec<IObject>,
}
pub(crate) struct IRegularLink {}
impl IRegularLink {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
original: &organic::types::RegularLink<'parse>,
) -> Result<IRegularLink, CustomError> {
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,
})
Ok(IRegularLink {})
}
}