diff --git a/src/context/angle_link.rs b/src/context/angle_link.rs index f456e60..243a6a9 100644 --- a/src/context/angle_link.rs +++ b/src/context/angle_link.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "angle_link")] -pub(crate) struct RenderAngleLink {} +pub(crate) struct RenderAngleLink { + post_blank: organic::types::PostBlank, +} rnoop!(RenderAngleLink, IAngleLink); diff --git a/src/context/babel_call.rs b/src/context/babel_call.rs index 9c1fa0d..a888213 100644 --- a/src/context/babel_call.rs +++ b/src/context/babel_call.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "babel_call")] -pub(crate) struct RenderBabelCall {} +pub(crate) struct RenderBabelCall { + post_blank: organic::types::PostBlank, +} rnoop!(RenderBabelCall, IBabelCall); diff --git a/src/context/bold.rs b/src/context/bold.rs index 7049a23..7e2f51f 100644 --- a/src/context/bold.rs +++ b/src/context/bold.rs @@ -12,6 +12,7 @@ use super::RenderObject; #[serde(rename = "bold")] pub(crate) struct RenderBold { children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderBold, IBold, original, render_context, { @@ -23,5 +24,8 @@ render!(RenderBold, IBold, original, render_context, { ret }; - Ok(RenderBold { children }) + Ok(RenderBold { + children, + post_blank: original.post_blank, + }) }); diff --git a/src/context/center_block.rs b/src/context/center_block.rs index 04db135..bcb873a 100644 --- a/src/context/center_block.rs +++ b/src/context/center_block.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "center_block")] -pub(crate) struct RenderCenterBlock {} +pub(crate) struct RenderCenterBlock { + post_blank: organic::types::PostBlank, +} rnoop!(RenderCenterBlock, ICenterBlock); diff --git a/src/context/citation.rs b/src/context/citation.rs index c9d44fa..5bd73b5 100644 --- a/src/context/citation.rs +++ b/src/context/citation.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "citation")] -pub(crate) struct RenderCitation {} +pub(crate) struct RenderCitation { + post_blank: organic::types::PostBlank, +} rnoop!(RenderCitation, ICitation); diff --git a/src/context/citation_reference.rs b/src/context/citation_reference.rs index 8c188d4..8203cc2 100644 --- a/src/context/citation_reference.rs +++ b/src/context/citation_reference.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "citation_reference")] -pub(crate) struct RenderCitationReference {} +pub(crate) struct RenderCitationReference { + post_blank: organic::types::PostBlank, +} rnoop!(RenderCitationReference, ICitationReference); diff --git a/src/context/clock.rs b/src/context/clock.rs index a8fe617..84cc613 100644 --- a/src/context/clock.rs +++ b/src/context/clock.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "clock")] -pub(crate) struct RenderClock {} +pub(crate) struct RenderClock { + post_blank: organic::types::PostBlank, +} rnoop!(RenderClock, IClock); diff --git a/src/context/code.rs b/src/context/code.rs index bdce2ac..5149218 100644 --- a/src/context/code.rs +++ b/src/context/code.rs @@ -11,10 +11,12 @@ use super::macros::render; #[serde(rename = "code")] pub(crate) struct RenderCode { contents: String, + post_blank: organic::types::PostBlank, } render!(RenderCode, ICode, original, _render_context, { Ok(RenderCode { contents: original.contents.clone(), + post_blank: original.post_blank, }) }); diff --git a/src/context/comment.rs b/src/context/comment.rs index fbab8e1..4f60095 100644 --- a/src/context/comment.rs +++ b/src/context/comment.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "comment")] -pub(crate) struct RenderComment {} +pub(crate) struct RenderComment { + post_blank: organic::types::PostBlank, +} rnoop!(RenderComment, IComment); diff --git a/src/context/comment_block.rs b/src/context/comment_block.rs index 34702e2..fb707c6 100644 --- a/src/context/comment_block.rs +++ b/src/context/comment_block.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "comment_block")] -pub(crate) struct RenderCommentBlock {} +pub(crate) struct RenderCommentBlock { + post_blank: organic::types::PostBlank, +} rnoop!(RenderCommentBlock, ICommentBlock); diff --git a/src/context/diary_sexp.rs b/src/context/diary_sexp.rs index e6235e5..e52a5c1 100644 --- a/src/context/diary_sexp.rs +++ b/src/context/diary_sexp.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "diary_sexp")] -pub(crate) struct RenderDiarySexp {} +pub(crate) struct RenderDiarySexp { + post_blank: organic::types::PostBlank, +} rnoop!(RenderDiarySexp, IDiarySexp); diff --git a/src/context/drawer.rs b/src/context/drawer.rs index a6b7f5e..879144d 100644 --- a/src/context/drawer.rs +++ b/src/context/drawer.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "drawer")] -pub(crate) struct RenderDrawer {} +pub(crate) struct RenderDrawer { + post_blank: organic::types::PostBlank, +} rnoop!(RenderDrawer, IDrawer); diff --git a/src/context/dynamic_block.rs b/src/context/dynamic_block.rs index bf7840f..ae3e2e6 100644 --- a/src/context/dynamic_block.rs +++ b/src/context/dynamic_block.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "dynamic_block")] -pub(crate) struct RenderDynamicBlock {} +pub(crate) struct RenderDynamicBlock { + post_blank: organic::types::PostBlank, +} rnoop!(RenderDynamicBlock, IDynamicBlock); diff --git a/src/context/entity.rs b/src/context/entity.rs index a69f24f..6429f7d 100644 --- a/src/context/entity.rs +++ b/src/context/entity.rs @@ -11,10 +11,12 @@ use super::macros::render; #[serde(rename = "entity")] pub(crate) struct RenderEntity { html: String, + post_blank: organic::types::PostBlank, } render!(RenderEntity, IEntity, original, _render_context, { Ok(RenderEntity { html: original.html.clone(), + post_blank: original.post_blank, }) }); diff --git a/src/context/example_block.rs b/src/context/example_block.rs index 464d435..b1c184b 100644 --- a/src/context/example_block.rs +++ b/src/context/example_block.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "example_block")] -pub(crate) struct RenderExampleBlock {} +pub(crate) struct RenderExampleBlock { + post_blank: organic::types::PostBlank, +} rnoop!(RenderExampleBlock, IExampleBlock); diff --git a/src/context/export_block.rs b/src/context/export_block.rs index 36e5a06..68df816 100644 --- a/src/context/export_block.rs +++ b/src/context/export_block.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "export_block")] -pub(crate) struct RenderExportBlock {} +pub(crate) struct RenderExportBlock { + post_blank: organic::types::PostBlank, +} rnoop!(RenderExportBlock, IExportBlock); diff --git a/src/context/export_snippet.rs b/src/context/export_snippet.rs index 246f25a..c410079 100644 --- a/src/context/export_snippet.rs +++ b/src/context/export_snippet.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "export_snippet")] -pub(crate) struct RenderExportSnippet {} +pub(crate) struct RenderExportSnippet { + post_blank: organic::types::PostBlank, +} rnoop!(RenderExportSnippet, IExportSnippet); diff --git a/src/context/fixed_width_area.rs b/src/context/fixed_width_area.rs index ca9bb7f..5cd08f2 100644 --- a/src/context/fixed_width_area.rs +++ b/src/context/fixed_width_area.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "fixed_width_area")] -pub(crate) struct RenderFixedWidthArea {} +pub(crate) struct RenderFixedWidthArea { + post_blank: organic::types::PostBlank, +} rnoop!(RenderFixedWidthArea, IFixedWidthArea); diff --git a/src/context/footnote_definition.rs b/src/context/footnote_definition.rs index 8077f33..58e0ab0 100644 --- a/src/context/footnote_definition.rs +++ b/src/context/footnote_definition.rs @@ -13,18 +13,21 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "footnote_definition")] -pub(crate) struct RenderFootnoteDefinition {} +pub(crate) struct RenderFootnoteDefinition { + post_blank: organic::types::PostBlank, +} rnoop!(RenderFootnoteDefinition, IFootnoteDefinition); #[derive(Debug, Serialize)] #[serde(tag = "type")] -#[serde(rename = "footnote_reference")] +#[serde(rename = "real_footnote_definition")] pub(crate) struct RenderRealFootnoteDefinition { definition_id: String, reference_link: String, label: String, contents: Vec, + // TODO: Do I need post_blank for real footnote definitions? } render!( diff --git a/src/context/footnote_reference.rs b/src/context/footnote_reference.rs index 28e319d..52ce71f 100644 --- a/src/context/footnote_reference.rs +++ b/src/context/footnote_reference.rs @@ -13,6 +13,7 @@ pub(crate) struct RenderFootnoteReference { reference_id: String, definition_link: String, label: String, + post_blank: organic::types::PostBlank, } render!( @@ -28,6 +29,7 @@ render!( original.get_definition_id(render_context.id_addition) ), label: original.get_display_label(), + post_blank: original.post_blank, }) } ); diff --git a/src/context/heading.rs b/src/context/heading.rs index 9b0064f..6daa5a1 100644 --- a/src/context/heading.rs +++ b/src/context/heading.rs @@ -15,6 +15,7 @@ pub(crate) struct RenderHeading { level: organic::types::HeadlineLevel, title: Vec, children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderHeading, IHeading, original, render_context, { @@ -38,5 +39,6 @@ render!(RenderHeading, IHeading, original, render_context, { level: original.level + 1, // Adding 1 because the page title is going to be h1. title, children, + post_blank: original.post_blank, }) }); diff --git a/src/context/horizontal_rule.rs b/src/context/horizontal_rule.rs index e941eb7..af626e5 100644 --- a/src/context/horizontal_rule.rs +++ b/src/context/horizontal_rule.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "horizontal_rule")] -pub(crate) struct RenderHorizontalRule {} +pub(crate) struct RenderHorizontalRule { + post_blank: organic::types::PostBlank, +} rnoop!(RenderHorizontalRule, IHorizontalRule); diff --git a/src/context/inline_babel_call.rs b/src/context/inline_babel_call.rs index cdbb1ac..56fb575 100644 --- a/src/context/inline_babel_call.rs +++ b/src/context/inline_babel_call.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "inline_babel_call")] -pub(crate) struct RenderInlineBabelCall {} +pub(crate) struct RenderInlineBabelCall { + post_blank: organic::types::PostBlank, +} rnoop!(RenderInlineBabelCall, IInlineBabelCall); diff --git a/src/context/inline_source_block.rs b/src/context/inline_source_block.rs index 79c9710..82a0d4f 100644 --- a/src/context/inline_source_block.rs +++ b/src/context/inline_source_block.rs @@ -11,6 +11,7 @@ use super::macros::render; #[serde(rename = "inline_source_block")] pub(crate) struct RenderInlineSourceBlock { value: String, + post_blank: organic::types::PostBlank, } render!( @@ -21,6 +22,7 @@ render!( { Ok(RenderInlineSourceBlock { value: original.value.clone(), + post_blank: original.post_blank, }) } ); diff --git a/src/context/italic.rs b/src/context/italic.rs index 9c4e995..797c259 100644 --- a/src/context/italic.rs +++ b/src/context/italic.rs @@ -12,6 +12,7 @@ use super::RenderObject; #[serde(rename = "italic")] pub(crate) struct RenderItalic { children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderItalic, IItalic, original, render_context, { @@ -23,5 +24,8 @@ render!(RenderItalic, IItalic, original, render_context, { ret }; - Ok(RenderItalic { children }) + Ok(RenderItalic { + children, + post_blank: original.post_blank, + }) }); diff --git a/src/context/keyword.rs b/src/context/keyword.rs index 17e08e7..82730dc 100644 --- a/src/context/keyword.rs +++ b/src/context/keyword.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "keyword")] -pub(crate) struct RenderKeyword {} +pub(crate) struct RenderKeyword { + post_blank: organic::types::PostBlank, +} rnoop!(RenderKeyword, IKeyword); diff --git a/src/context/latex_environment.rs b/src/context/latex_environment.rs index 72a59e4..bffc3f8 100644 --- a/src/context/latex_environment.rs +++ b/src/context/latex_environment.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "latex_environment")] -pub(crate) struct RenderLatexEnvironment {} +pub(crate) struct RenderLatexEnvironment { + post_blank: organic::types::PostBlank, +} rnoop!(RenderLatexEnvironment, ILatexEnvironment); diff --git a/src/context/latex_fragment.rs b/src/context/latex_fragment.rs index fa695a0..a96f497 100644 --- a/src/context/latex_fragment.rs +++ b/src/context/latex_fragment.rs @@ -11,6 +11,7 @@ use super::macros::render; #[serde(rename = "latex_fragment")] pub(crate) struct RenderLatexFragment { value: String, + post_blank: organic::types::PostBlank, } render!( @@ -21,6 +22,7 @@ render!( { Ok(RenderLatexFragment { value: original.value.clone(), + post_blank: original.post_blank, }) } ); diff --git a/src/context/line_break.rs b/src/context/line_break.rs index 95f8554..86ac482 100644 --- a/src/context/line_break.rs +++ b/src/context/line_break.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "line_break")] -pub(crate) struct RenderLineBreak {} +pub(crate) struct RenderLineBreak { + post_blank: organic::types::PostBlank, +} rnoop!(RenderLineBreak, ILineBreak); diff --git a/src/context/macros.rs b/src/context/macros.rs index 1ed3338..9635f8e 100644 --- a/src/context/macros.rs +++ b/src/context/macros.rs @@ -24,9 +24,11 @@ macro_rules! rnoop { impl $rstruct { pub(crate) fn new( _render_context: RenderContext<'_>, - _original: &$istruct, + original: &$istruct, ) -> Result<$rstruct, CustomError> { - Ok($rstruct {}) + Ok($rstruct { + post_blank: original.post_blank, + }) } } }; diff --git a/src/context/org_macro.rs b/src/context/org_macro.rs index 8c03ff2..9105174 100644 --- a/src/context/org_macro.rs +++ b/src/context/org_macro.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "org_macro")] -pub(crate) struct RenderOrgMacro {} +pub(crate) struct RenderOrgMacro { + post_blank: organic::types::PostBlank, +} rnoop!(RenderOrgMacro, IOrgMacro); diff --git a/src/context/paragraph.rs b/src/context/paragraph.rs index c7bd6e3..9b69ee3 100644 --- a/src/context/paragraph.rs +++ b/src/context/paragraph.rs @@ -12,6 +12,7 @@ use super::RenderObject; #[serde(rename = "paragraph")] pub(crate) struct RenderParagraph { children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderParagraph, IParagraph, original, render_context, { @@ -23,5 +24,8 @@ render!(RenderParagraph, IParagraph, original, render_context, { ret }; - Ok(RenderParagraph { children }) + Ok(RenderParagraph { + children, + post_blank: original.post_blank, + }) }); diff --git a/src/context/plain_link.rs b/src/context/plain_link.rs index a30c77e..897206f 100644 --- a/src/context/plain_link.rs +++ b/src/context/plain_link.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "plain_link")] -pub(crate) struct RenderPlainLink {} +pub(crate) struct RenderPlainLink { + post_blank: organic::types::PostBlank, +} rnoop!(RenderPlainLink, IPlainLink); diff --git a/src/context/plain_list.rs b/src/context/plain_list.rs index 7b6fe69..e5765d1 100644 --- a/src/context/plain_list.rs +++ b/src/context/plain_list.rs @@ -13,6 +13,7 @@ use super::plain_list_item::RenderPlainListItem; pub(crate) struct RenderPlainList { list_type: String, children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderPlainList, IPlainList, original, render_context, { @@ -32,5 +33,6 @@ render!(RenderPlainList, IPlainList, original, render_context, { Ok(RenderPlainList { list_type, children, + post_blank: original.post_blank, }) }); diff --git a/src/context/plain_text.rs b/src/context/plain_text.rs index 134d685..f027694 100644 --- a/src/context/plain_text.rs +++ b/src/context/plain_text.rs @@ -11,10 +11,12 @@ use super::macros::render; #[serde(rename = "plain_text")] pub(crate) struct RenderPlainText { source: String, + post_blank: organic::types::PostBlank, } render!(RenderPlainText, IPlainText, original, _render_context, { Ok(RenderPlainText { source: original.source.clone(), + post_blank: original.post_blank, }) }); diff --git a/src/context/planning.rs b/src/context/planning.rs index 33f8b2c..f454ec3 100644 --- a/src/context/planning.rs +++ b/src/context/planning.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "planning")] -pub(crate) struct RenderPlanning {} +pub(crate) struct RenderPlanning { + post_blank: organic::types::PostBlank, +} rnoop!(RenderPlanning, IPlanning); diff --git a/src/context/property_drawer.rs b/src/context/property_drawer.rs index 69ee47e..cccecac 100644 --- a/src/context/property_drawer.rs +++ b/src/context/property_drawer.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "property_drawer")] -pub(crate) struct RenderPropertyDrawer {} +pub(crate) struct RenderPropertyDrawer { + post_blank: organic::types::PostBlank, +} rnoop!(RenderPropertyDrawer, IPropertyDrawer); diff --git a/src/context/quote_block.rs b/src/context/quote_block.rs index 581cbe2..20edd83 100644 --- a/src/context/quote_block.rs +++ b/src/context/quote_block.rs @@ -12,6 +12,7 @@ use super::RenderElement; #[serde(rename = "quote_block")] pub(crate) struct RenderQuoteBlock { children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderQuoteBlock, IQuoteBlock, original, render_context, { @@ -23,5 +24,8 @@ render!(RenderQuoteBlock, IQuoteBlock, original, render_context, { ret }; - Ok(RenderQuoteBlock { children }) + Ok(RenderQuoteBlock { + children, + post_blank: original.post_blank, + }) }); diff --git a/src/context/radio_link.rs b/src/context/radio_link.rs index a7eabdb..2e48449 100644 --- a/src/context/radio_link.rs +++ b/src/context/radio_link.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "radio_link")] -pub(crate) struct RenderRadioLink {} +pub(crate) struct RenderRadioLink { + post_blank: organic::types::PostBlank, +} rnoop!(RenderRadioLink, IRadioLink); diff --git a/src/context/radio_target.rs b/src/context/radio_target.rs index 5f91d13..f0ba805 100644 --- a/src/context/radio_target.rs +++ b/src/context/radio_target.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "radio_target")] -pub(crate) struct RenderRadioTarget {} +pub(crate) struct RenderRadioTarget { + post_blank: organic::types::PostBlank, +} rnoop!(RenderRadioTarget, IRadioTarget); diff --git a/src/context/regular_link.rs b/src/context/regular_link.rs index 9dfceae..9a84f51 100644 --- a/src/context/regular_link.rs +++ b/src/context/regular_link.rs @@ -13,6 +13,7 @@ use super::RenderObject; pub(crate) struct RenderRegularLink { raw_link: String, children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderRegularLink, IRegularLink, original, render_context, { @@ -27,5 +28,6 @@ render!(RenderRegularLink, IRegularLink, original, render_context, { Ok(RenderRegularLink { raw_link: original.raw_link.clone(), children, + post_blank: original.post_blank, }) }); diff --git a/src/context/section.rs b/src/context/section.rs index aa297c3..9e69f0f 100644 --- a/src/context/section.rs +++ b/src/context/section.rs @@ -12,6 +12,7 @@ use super::RenderElement; #[serde(rename = "section")] pub(crate) struct RenderSection { children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderSection, ISection, original, render_context, { @@ -23,5 +24,8 @@ render!(RenderSection, ISection, original, render_context, { ret }; - Ok(RenderSection { children }) + Ok(RenderSection { + children, + post_blank: original.post_blank, + }) }); diff --git a/src/context/special_block.rs b/src/context/special_block.rs index 21f96fc..5b46e9c 100644 --- a/src/context/special_block.rs +++ b/src/context/special_block.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "special_block")] -pub(crate) struct RenderSpecialBlock {} +pub(crate) struct RenderSpecialBlock { + post_blank: organic::types::PostBlank, +} rnoop!(RenderSpecialBlock, ISpecialBlock); diff --git a/src/context/src_block.rs b/src/context/src_block.rs index bc9451a..2f6298d 100644 --- a/src/context/src_block.rs +++ b/src/context/src_block.rs @@ -12,11 +12,13 @@ use super::macros::render; pub(crate) struct RenderSrcBlock { lines: Vec, language: Option, + post_blank: organic::types::PostBlank, } render!(RenderSrcBlock, ISrcBlock, original, _render_context, { Ok(RenderSrcBlock { lines: original.lines.clone(), language: original.language.clone(), + post_blank: original.post_blank, }) }); diff --git a/src/context/statistics_cookie.rs b/src/context/statistics_cookie.rs index ca71b95..9326819 100644 --- a/src/context/statistics_cookie.rs +++ b/src/context/statistics_cookie.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "statistics_cookie")] -pub(crate) struct RenderStatisticsCookie {} +pub(crate) struct RenderStatisticsCookie { + post_blank: organic::types::PostBlank, +} rnoop!(RenderStatisticsCookie, IStatisticsCookie); diff --git a/src/context/strike_through.rs b/src/context/strike_through.rs index 1d53f9c..ac578bf 100644 --- a/src/context/strike_through.rs +++ b/src/context/strike_through.rs @@ -12,6 +12,7 @@ use super::RenderObject; #[serde(rename = "strike_through")] pub(crate) struct RenderStrikeThrough { children: Vec, + post_blank: organic::types::PostBlank, } render!( @@ -28,6 +29,9 @@ render!( ret }; - Ok(RenderStrikeThrough { children }) + Ok(RenderStrikeThrough { + children, + post_blank: original.post_blank, + }) } ); diff --git a/src/context/subscript.rs b/src/context/subscript.rs index 359492c..4efabdf 100644 --- a/src/context/subscript.rs +++ b/src/context/subscript.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "subscript")] -pub(crate) struct RenderSubscript {} +pub(crate) struct RenderSubscript { + post_blank: organic::types::PostBlank, +} rnoop!(RenderSubscript, ISubscript); diff --git a/src/context/superscript.rs b/src/context/superscript.rs index 3af3340..d18e60d 100644 --- a/src/context/superscript.rs +++ b/src/context/superscript.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "superscript")] -pub(crate) struct RenderSuperscript {} +pub(crate) struct RenderSuperscript { + post_blank: organic::types::PostBlank, +} rnoop!(RenderSuperscript, ISuperscript); diff --git a/src/context/table.rs b/src/context/table.rs index d1af62f..045d7a6 100644 --- a/src/context/table.rs +++ b/src/context/table.rs @@ -12,6 +12,7 @@ use super::table_row::RenderTableRow; #[serde(rename = "table")] pub(crate) struct RenderTable { children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderTable, ITable, original, render_context, { @@ -23,5 +24,8 @@ render!(RenderTable, ITable, original, render_context, { ret }; - Ok(RenderTable { children }) + Ok(RenderTable { + children, + post_blank: original.post_blank, + }) }); diff --git a/src/context/target.rs b/src/context/target.rs index 458bc69..5d9fede 100644 --- a/src/context/target.rs +++ b/src/context/target.rs @@ -11,10 +11,12 @@ use super::macros::render; #[serde(rename = "target")] pub(crate) struct RenderTarget { id: String, + post_blank: organic::types::PostBlank, } render!(RenderTarget, ITarget, original, _render_context, { Ok(RenderTarget { id: original.id.clone(), + post_blank: original.post_blank, }) }); diff --git a/src/context/timestamp.rs b/src/context/timestamp.rs index cf5ce54..c5f15b7 100644 --- a/src/context/timestamp.rs +++ b/src/context/timestamp.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "timestamp")] -pub(crate) struct RenderTimestamp {} +pub(crate) struct RenderTimestamp { + post_blank: organic::types::PostBlank, +} rnoop!(RenderTimestamp, ITimestamp); diff --git a/src/context/underline.rs b/src/context/underline.rs index ab5fa5a..c1f1ce2 100644 --- a/src/context/underline.rs +++ b/src/context/underline.rs @@ -12,6 +12,7 @@ use super::RenderObject; #[serde(rename = "underline")] pub(crate) struct RenderUnderline { children: Vec, + post_blank: organic::types::PostBlank, } render!(RenderUnderline, IUnderline, original, render_context, { @@ -23,5 +24,8 @@ render!(RenderUnderline, IUnderline, original, render_context, { ret }; - Ok(RenderUnderline { children }) + Ok(RenderUnderline { + children, + post_blank: original.post_blank, + }) }); diff --git a/src/context/verbatim.rs b/src/context/verbatim.rs index 68d2d0d..3324aa7 100644 --- a/src/context/verbatim.rs +++ b/src/context/verbatim.rs @@ -11,10 +11,12 @@ use super::macros::render; #[serde(rename = "verbatim")] pub(crate) struct RenderVerbatim { contents: String, + post_blank: organic::types::PostBlank, } render!(RenderVerbatim, IVerbatim, original, _render_context, { Ok(RenderVerbatim { contents: original.contents.clone(), + post_blank: original.post_blank, }) }); diff --git a/src/context/verse_block.rs b/src/context/verse_block.rs index cea5eb5..3816ac2 100644 --- a/src/context/verse_block.rs +++ b/src/context/verse_block.rs @@ -9,6 +9,8 @@ use super::macros::rnoop; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "verse_block")] -pub(crate) struct RenderVerseBlock {} +pub(crate) struct RenderVerseBlock { + post_blank: organic::types::PostBlank, +} rnoop!(RenderVerseBlock, IVerseBlock); diff --git a/src/intermediate/angle_link.rs b/src/intermediate/angle_link.rs index 8852e4e..00bccad 100644 --- a/src/intermediate/angle_link.rs +++ b/src/intermediate/angle_link.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IAngleLink, AngleLink); diff --git a/src/intermediate/babel_call.rs b/src/intermediate/babel_call.rs index 62d5757..a7589d7 100644 --- a/src/intermediate/babel_call.rs +++ b/src/intermediate/babel_call.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IBabelCall, BabelCall); diff --git a/src/intermediate/bold.rs b/src/intermediate/bold.rs index 7d7e751..d7d9ada 100644 --- a/src/intermediate/bold.rs +++ b/src/intermediate/bold.rs @@ -1,3 +1,5 @@ +use organic::types::StandardProperties; + use super::macros::intermediate; use super::IObject; @@ -6,6 +8,7 @@ use crate::error::CustomError; #[derive(Debug, Clone)] pub(crate) struct IBold { pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -22,6 +25,9 @@ intermediate!( ret }; - Ok(IBold { children }) + Ok(IBold { + children, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/center_block.rs b/src/intermediate/center_block.rs index 14541d3..d92bf4f 100644 --- a/src/intermediate/center_block.rs +++ b/src/intermediate/center_block.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ICenterBlock, CenterBlock); diff --git a/src/intermediate/citation.rs b/src/intermediate/citation.rs index e4971b0..206013a 100644 --- a/src/intermediate/citation.rs +++ b/src/intermediate/citation.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ICitation, Citation); diff --git a/src/intermediate/citation_reference.rs b/src/intermediate/citation_reference.rs index 1d4b955..e03593f 100644 --- a/src/intermediate/citation_reference.rs +++ b/src/intermediate/citation_reference.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ICitationReference, CitationReference); diff --git a/src/intermediate/clock.rs b/src/intermediate/clock.rs index 53f878f..29232b8 100644 --- a/src/intermediate/clock.rs +++ b/src/intermediate/clock.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IClock, Clock); diff --git a/src/intermediate/code.rs b/src/intermediate/code.rs index d166683..be0d73a 100644 --- a/src/intermediate/code.rs +++ b/src/intermediate/code.rs @@ -1,3 +1,5 @@ +use organic::types::StandardProperties; + use super::macros::intermediate; use crate::error::CustomError; @@ -5,6 +7,7 @@ use crate::error::CustomError; #[derive(Debug, Clone)] pub(crate) struct ICode { pub(crate) contents: String, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -16,6 +19,7 @@ intermediate!( Ok(ICode { // TODO: Should this coalesce whitespace like PlainText? contents: original.contents.to_owned(), + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/comment.rs b/src/intermediate/comment.rs index 1a36791..a2db760 100644 --- a/src/intermediate/comment.rs +++ b/src/intermediate/comment.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IComment, Comment); diff --git a/src/intermediate/comment_block.rs b/src/intermediate/comment_block.rs index a65d6b4..29ab37a 100644 --- a/src/intermediate/comment_block.rs +++ b/src/intermediate/comment_block.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ICommentBlock, CommentBlock); diff --git a/src/intermediate/diary_sexp.rs b/src/intermediate/diary_sexp.rs index e256852..67b8662 100644 --- a/src/intermediate/diary_sexp.rs +++ b/src/intermediate/diary_sexp.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IDiarySexp, DiarySexp); diff --git a/src/intermediate/drawer.rs b/src/intermediate/drawer.rs index 9b23719..d6939b3 100644 --- a/src/intermediate/drawer.rs +++ b/src/intermediate/drawer.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IDrawer, Drawer); diff --git a/src/intermediate/dynamic_block.rs b/src/intermediate/dynamic_block.rs index 3094839..f3622ac 100644 --- a/src/intermediate/dynamic_block.rs +++ b/src/intermediate/dynamic_block.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IDynamicBlock, DynamicBlock); diff --git a/src/intermediate/entity.rs b/src/intermediate/entity.rs index 11dff6d..3d69295 100644 --- a/src/intermediate/entity.rs +++ b/src/intermediate/entity.rs @@ -1,10 +1,11 @@ use super::macros::intermediate; - use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct IEntity { pub(crate) html: String, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -15,6 +16,7 @@ intermediate!( { Ok(IEntity { html: original.html.to_owned(), + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/example_block.rs b/src/intermediate/example_block.rs index bcb00c0..24e8690 100644 --- a/src/intermediate/example_block.rs +++ b/src/intermediate/example_block.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IExampleBlock, ExampleBlock); diff --git a/src/intermediate/export_block.rs b/src/intermediate/export_block.rs index d2b001f..34b8b96 100644 --- a/src/intermediate/export_block.rs +++ b/src/intermediate/export_block.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IExportBlock, ExportBlock); diff --git a/src/intermediate/export_snippet.rs b/src/intermediate/export_snippet.rs index 4534303..30a3447 100644 --- a/src/intermediate/export_snippet.rs +++ b/src/intermediate/export_snippet.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IExportSnippet, ExportSnippet); diff --git a/src/intermediate/fixed_width_area.rs b/src/intermediate/fixed_width_area.rs index ef6db8e..ffd26e0 100644 --- a/src/intermediate/fixed_width_area.rs +++ b/src/intermediate/fixed_width_area.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IFixedWidthArea, FixedWidthArea); diff --git a/src/intermediate/footnote_definition.rs b/src/intermediate/footnote_definition.rs index bef6779..1d612e5 100644 --- a/src/intermediate/footnote_definition.rs +++ b/src/intermediate/footnote_definition.rs @@ -1,12 +1,14 @@ use super::macros::intermediate; use super::registry::register_footnote_definition; -use super::IntermediateContext; - use super::IAstNode; +use super::IntermediateContext; use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] -pub(crate) struct IFootnoteDefinition {} +pub(crate) struct IFootnoteDefinition { + pub(crate) post_blank: organic::types::PostBlank, +} intermediate!( IFootnoteDefinition, @@ -16,12 +18,15 @@ intermediate!( { register_footnote_definition(intermediate_context, original.label, &original.children) .await?; - Ok(IFootnoteDefinition {}) + Ok(IFootnoteDefinition { + post_blank: original.get_post_blank(), + }) } ); #[derive(Debug)] pub(crate) struct IRealFootnoteDefinition { + // TODO: Do I need post_blank for the real footnote definitions? pub(crate) footnote_id: usize, pub(crate) contents: Vec, } diff --git a/src/intermediate/footnote_reference.rs b/src/intermediate/footnote_reference.rs index 5aef79d..75dac0f 100644 --- a/src/intermediate/footnote_reference.rs +++ b/src/intermediate/footnote_reference.rs @@ -1,12 +1,13 @@ use super::macros::intermediate; use super::registry::get_footnote_reference_id; - use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct IFootnoteReference { footnote_id: usize, duplicate_offset: usize, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -21,6 +22,7 @@ intermediate!( Ok(IFootnoteReference { footnote_id, duplicate_offset: reference_count, + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/heading.rs b/src/intermediate/heading.rs index fbaba46..5cc8f04 100644 --- a/src/intermediate/heading.rs +++ b/src/intermediate/heading.rs @@ -1,14 +1,15 @@ use super::macros::intermediate; - use super::IDocumentElement; use super::IObject; use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct IHeading { pub(crate) level: organic::types::HeadlineLevel, pub(crate) title: Vec, pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -35,6 +36,7 @@ intermediate!( title, level: original.level, children, + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/horizontal_rule.rs b/src/intermediate/horizontal_rule.rs index 8a2d342..7927fdc 100644 --- a/src/intermediate/horizontal_rule.rs +++ b/src/intermediate/horizontal_rule.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IHorizontalRule, HorizontalRule); diff --git a/src/intermediate/inline_babel_call.rs b/src/intermediate/inline_babel_call.rs index 2f60310..3ea7aef 100644 --- a/src/intermediate/inline_babel_call.rs +++ b/src/intermediate/inline_babel_call.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IInlineBabelCall, InlineBabelCall); diff --git a/src/intermediate/inline_source_block.rs b/src/intermediate/inline_source_block.rs index ab32a9c..6c62f26 100644 --- a/src/intermediate/inline_source_block.rs +++ b/src/intermediate/inline_source_block.rs @@ -1,10 +1,11 @@ use super::macros::intermediate; - use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct IInlineSourceBlock { pub(crate) value: String, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -15,6 +16,7 @@ intermediate!( { Ok(IInlineSourceBlock { value: original.value.to_owned(), + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/italic.rs b/src/intermediate/italic.rs index 44bb165..350cf14 100644 --- a/src/intermediate/italic.rs +++ b/src/intermediate/italic.rs @@ -1,3 +1,5 @@ +use organic::types::StandardProperties; + use super::macros::intermediate; use super::IObject; @@ -6,6 +8,7 @@ use crate::error::CustomError; #[derive(Debug, Clone)] pub(crate) struct IItalic { pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -22,6 +25,9 @@ intermediate!( ret }; - Ok(IItalic { children }) + Ok(IItalic { + children, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/keyword.rs b/src/intermediate/keyword.rs index d282bb4..7ec06fb 100644 --- a/src/intermediate/keyword.rs +++ b/src/intermediate/keyword.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IKeyword, Keyword); diff --git a/src/intermediate/latex_environment.rs b/src/intermediate/latex_environment.rs index 891f570..1b4480e 100644 --- a/src/intermediate/latex_environment.rs +++ b/src/intermediate/latex_environment.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ILatexEnvironment, LatexEnvironment); diff --git a/src/intermediate/latex_fragment.rs b/src/intermediate/latex_fragment.rs index ee4195d..beab9b6 100644 --- a/src/intermediate/latex_fragment.rs +++ b/src/intermediate/latex_fragment.rs @@ -1,10 +1,11 @@ use super::macros::intermediate; - use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct ILatexFragment { pub(crate) value: String, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -20,6 +21,9 @@ intermediate!( } else { original.value.to_owned() }; - Ok(ILatexFragment { value }) + Ok(ILatexFragment { + value, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/line_break.rs b/src/intermediate/line_break.rs index a092d54..5a62df1 100644 --- a/src/intermediate/line_break.rs +++ b/src/intermediate/line_break.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ILineBreak, LineBreak); diff --git a/src/intermediate/macros.rs b/src/intermediate/macros.rs index 8b9623f..54f877e 100644 --- a/src/intermediate/macros.rs +++ b/src/intermediate/macros.rs @@ -4,14 +4,18 @@ macro_rules! inoop { ($istruct:ident, $pstruct:ident) => { #[derive(Debug, Clone)] - pub(crate) struct $istruct {} + pub(crate) struct $istruct { + pub(crate) post_blank: organic::types::PostBlank, + } impl $istruct { pub(crate) async fn new<'reg, 'orig, 'parse>( _intermediate_context: crate::intermediate::IntermediateContext<'orig, 'parse>, - _original: &'orig organic::types::$pstruct<'parse>, + original: &'orig organic::types::$pstruct<'parse>, ) -> Result<$istruct, CustomError> { - Ok($istruct {}) + Ok($istruct { + post_blank: original.get_post_blank(), + }) } } }; diff --git a/src/intermediate/org_macro.rs b/src/intermediate/org_macro.rs index ffc56d3..f1a158f 100644 --- a/src/intermediate/org_macro.rs +++ b/src/intermediate/org_macro.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IOrgMacro, OrgMacro); diff --git a/src/intermediate/paragraph.rs b/src/intermediate/paragraph.rs index a93eb57..0b3adac 100644 --- a/src/intermediate/paragraph.rs +++ b/src/intermediate/paragraph.rs @@ -1,11 +1,12 @@ use super::macros::intermediate; - use super::IObject; use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct IParagraph { pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -22,6 +23,9 @@ intermediate!( ret }; - Ok(IParagraph { children }) + Ok(IParagraph { + children, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/plain_link.rs b/src/intermediate/plain_link.rs index 0178945..0a53e79 100644 --- a/src/intermediate/plain_link.rs +++ b/src/intermediate/plain_link.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IPlainLink, PlainLink); diff --git a/src/intermediate/plain_list.rs b/src/intermediate/plain_list.rs index 063305e..62f834b 100644 --- a/src/intermediate/plain_list.rs +++ b/src/intermediate/plain_list.rs @@ -1,12 +1,13 @@ use super::macros::intermediate; - use super::IPlainListItem; use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct IPlainList { pub(crate) list_type: organic::types::PlainListType, pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -26,6 +27,7 @@ intermediate!( Ok(IPlainList { list_type: original.list_type, children, + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/plain_text.rs b/src/intermediate/plain_text.rs index a346cbe..462c778 100644 --- a/src/intermediate/plain_text.rs +++ b/src/intermediate/plain_text.rs @@ -1,3 +1,5 @@ +use organic::types::StandardProperties; + use super::macros::intermediate; use super::util::coalesce_whitespace; @@ -6,6 +8,7 @@ use crate::error::CustomError; #[derive(Debug, Clone)] pub(crate) struct IPlainText { pub(crate) source: String, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -16,6 +19,7 @@ intermediate!( { Ok(IPlainText { source: coalesce_whitespace(original.source).into_owned(), + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/planning.rs b/src/intermediate/planning.rs index 56cee1a..b265614 100644 --- a/src/intermediate/planning.rs +++ b/src/intermediate/planning.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IPlanning, Planning); diff --git a/src/intermediate/property_drawer.rs b/src/intermediate/property_drawer.rs index 835cc69..217ef8f 100644 --- a/src/intermediate/property_drawer.rs +++ b/src/intermediate/property_drawer.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IPropertyDrawer, PropertyDrawer); diff --git a/src/intermediate/quote_block.rs b/src/intermediate/quote_block.rs index 68daeda..e4e6f5d 100644 --- a/src/intermediate/quote_block.rs +++ b/src/intermediate/quote_block.rs @@ -1,11 +1,12 @@ use super::macros::intermediate; - use super::IElement; use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct IQuoteBlock { pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -22,6 +23,9 @@ intermediate!( ret }; - Ok(IQuoteBlock { children }) + Ok(IQuoteBlock { + children, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/radio_link.rs b/src/intermediate/radio_link.rs index f51f0b0..98f6bc8 100644 --- a/src/intermediate/radio_link.rs +++ b/src/intermediate/radio_link.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IRadioLink, RadioLink); diff --git a/src/intermediate/radio_target.rs b/src/intermediate/radio_target.rs index 9c56e2f..5d5db5a 100644 --- a/src/intermediate/radio_target.rs +++ b/src/intermediate/radio_target.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IRadioTarget, RadioTarget); diff --git a/src/intermediate/regular_link.rs b/src/intermediate/regular_link.rs index 14262ee..2b2c249 100644 --- a/src/intermediate/regular_link.rs +++ b/src/intermediate/regular_link.rs @@ -1,3 +1,5 @@ +use organic::types::StandardProperties; + use super::macros::intermediate; use super::IObject; @@ -7,6 +9,7 @@ use crate::error::CustomError; pub(crate) struct IRegularLink { pub(crate) raw_link: String, pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -25,6 +28,7 @@ intermediate!( Ok(IRegularLink { raw_link: original.get_raw_link().into_owned(), children, + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/section.rs b/src/intermediate/section.rs index defca30..089eb4e 100644 --- a/src/intermediate/section.rs +++ b/src/intermediate/section.rs @@ -1,11 +1,12 @@ use super::macros::intermediate; - use super::IElement; use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct ISection { pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -22,6 +23,9 @@ intermediate!( ret }; - Ok(ISection { children }) + Ok(ISection { + children, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/special_block.rs b/src/intermediate/special_block.rs index de07572..b97da8a 100644 --- a/src/intermediate/special_block.rs +++ b/src/intermediate/special_block.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ISpecialBlock, SpecialBlock); diff --git a/src/intermediate/src_block.rs b/src/intermediate/src_block.rs index 6bc9ef0..b0d948b 100644 --- a/src/intermediate/src_block.rs +++ b/src/intermediate/src_block.rs @@ -1,11 +1,12 @@ use super::macros::intermediate; - use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct ISrcBlock { pub(crate) lines: Vec, pub(crate) language: Option, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -58,7 +59,11 @@ intermediate!( }) .collect(); let language = original.language.map(str::to_owned); - Ok(ISrcBlock { lines, language }) + Ok(ISrcBlock { + lines, + language, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/statistics_cookie.rs b/src/intermediate/statistics_cookie.rs index 1c6c115..6de55ba 100644 --- a/src/intermediate/statistics_cookie.rs +++ b/src/intermediate/statistics_cookie.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IStatisticsCookie, StatisticsCookie); diff --git a/src/intermediate/strike_through.rs b/src/intermediate/strike_through.rs index 151a4ee..3e8a6bc 100644 --- a/src/intermediate/strike_through.rs +++ b/src/intermediate/strike_through.rs @@ -1,3 +1,5 @@ +use organic::types::StandardProperties; + use super::macros::intermediate; use super::IObject; @@ -6,6 +8,7 @@ use crate::error::CustomError; #[derive(Debug, Clone)] pub(crate) struct IStrikeThrough { pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -22,6 +25,9 @@ intermediate!( ret }; - Ok(IStrikeThrough { children }) + Ok(IStrikeThrough { + children, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/subscript.rs b/src/intermediate/subscript.rs index e45c784..81b9ebc 100644 --- a/src/intermediate/subscript.rs +++ b/src/intermediate/subscript.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ISubscript, Subscript); diff --git a/src/intermediate/superscript.rs b/src/intermediate/superscript.rs index 80501ab..775b489 100644 --- a/src/intermediate/superscript.rs +++ b/src/intermediate/superscript.rs @@ -1,5 +1,5 @@ use super::macros::inoop; - use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ISuperscript, Superscript); diff --git a/src/intermediate/table.rs b/src/intermediate/table.rs index cc99add..c52977e 100644 --- a/src/intermediate/table.rs +++ b/src/intermediate/table.rs @@ -1,11 +1,12 @@ use super::macros::intermediate; - use super::table_row::ITableRow; use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct ITable { pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -22,6 +23,9 @@ intermediate!( ret }; - Ok(ITable { children }) + Ok(ITable { + children, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/target.rs b/src/intermediate/target.rs index 3030fe9..e172164 100644 --- a/src/intermediate/target.rs +++ b/src/intermediate/target.rs @@ -1,11 +1,12 @@ use super::macros::intermediate; - use crate::error::CustomError; +use organic::types::StandardProperties; #[derive(Debug, Clone)] pub(crate) struct ITarget { pub(crate) id: String, value: String, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -19,6 +20,7 @@ intermediate!( Ok(ITarget { id: id.clone(), value: original.value.to_owned(), + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/timestamp.rs b/src/intermediate/timestamp.rs index 3ab13ac..3fcd45b 100644 --- a/src/intermediate/timestamp.rs +++ b/src/intermediate/timestamp.rs @@ -1,6 +1,5 @@ -use crate::error::CustomError; - use super::macros::inoop; - +use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(ITimestamp, Timestamp); diff --git a/src/intermediate/underline.rs b/src/intermediate/underline.rs index ebbde2f..d30d2c3 100644 --- a/src/intermediate/underline.rs +++ b/src/intermediate/underline.rs @@ -1,3 +1,5 @@ +use organic::types::StandardProperties; + use super::macros::intermediate; use super::IObject; @@ -6,6 +8,7 @@ use crate::error::CustomError; #[derive(Debug, Clone)] pub(crate) struct IUnderline { pub(crate) children: Vec, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -22,6 +25,9 @@ intermediate!( ret }; - Ok(IUnderline { children }) + Ok(IUnderline { + children, + post_blank: original.get_post_blank(), + }) } ); diff --git a/src/intermediate/verbatim.rs b/src/intermediate/verbatim.rs index 787c244..a820bec 100644 --- a/src/intermediate/verbatim.rs +++ b/src/intermediate/verbatim.rs @@ -1,3 +1,5 @@ +use organic::types::StandardProperties; + use super::macros::intermediate; use crate::error::CustomError; @@ -5,6 +7,7 @@ use crate::error::CustomError; #[derive(Debug, Clone)] pub(crate) struct IVerbatim { pub(crate) contents: String, + pub(crate) post_blank: organic::types::PostBlank, } intermediate!( @@ -16,6 +19,7 @@ intermediate!( Ok(IVerbatim { // TODO: Should this coalesce whitespace like PlainText? contents: original.contents.to_owned(), + post_blank: original.get_post_blank(), }) } ); diff --git a/src/intermediate/verse_block.rs b/src/intermediate/verse_block.rs index 2013ead..4ff1615 100644 --- a/src/intermediate/verse_block.rs +++ b/src/intermediate/verse_block.rs @@ -1,6 +1,5 @@ -use crate::error::CustomError; - use super::macros::inoop; - +use crate::error::CustomError; +use organic::types::StandardProperties; inoop!(IVerseBlock, VerseBlock);