diff options
| author | Philipp A | 2020-06-03 15:07:30 +0200 | 
|---|---|---|
| committer | Philipp A | 2020-06-03 15:07:30 +0200 | 
| commit | ef64405f2b57f87f16cbd0e4ceaf13dcf280c47e (patch) | |
| tree | 7fbd5b2ed96c523de5080fcef5ba7abb43e1da07 /renderer | |
| parent | 2634a083a58e15935ce57eb0077f736309e78aae (diff) | |
| download | rust-rst-ef64405f2b57f87f16cbd0e4ceaf13dcf280c47e.tar.bz2 | |
circumvent E0119
Diffstat (limited to 'renderer')
| -rw-r--r-- | renderer/src/html.rs | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/renderer/src/html.rs b/renderer/src/html.rs index 706ec2f..fe934e7 100644 --- a/renderer/src/html.rs +++ b/renderer/src/html.rs @@ -9,6 +9,7 @@ use failure::Error;  use document_tree::{  	Document,Element,HasChildren,ExtraAttributes,  	elements as e, +	extra_attributes as a,  	element_categories as c,  }; @@ -172,8 +173,9 @@ impl_html_render_cat!(BodyElement { Paragraph, LiteralBlock, DoctestBlock, MathB  impl_html_render_simple!(Paragraph => p, LiteralBlock => pre, MathBlock => math, Rubric => a, Compound => p, Container => div, BulletList => ul["\n"], EnumeratedList => ol["\n"], DefinitionList => dl["\n"], FieldList => dl["\n"], OptionList => pre, LineBlock => div["\n"], BlockQuote => blockquote, Admonition => aside, Attention => aside, Hint => aside, Note => aside, Caution => aside, Danger => aside, Error => aside, Important => aside, Tip => aside, Warning => aside, Figure => figure);  impl_html_render_simple_nochildren!(Table => table);  //TODO: after implementing the table, move it to elems with children -//impl<I> HTMLRender for I where I: e::Element + a::ExtraAttributes<a::Image> -macro_rules! impl_render_html_image { ($t:ty) => { impl HTMLRender for $t { +// circumvent E0119 +trait IMark {} impl IMark for e::Image {} impl IMark for e::ImageInline {} +impl<I> HTMLRender for I where I: e::Element + a::ExtraAttributes<a::Image> + IMark {  	fn render_html<W>(&self, renderer: &mut HTMLRenderer<W>) -> Result<(), Error> where W: Write {  		let extra = self.extra();  		if let Some(ref target) = extra.target { @@ -193,9 +195,7 @@ macro_rules! impl_render_html_image { ($t:ty) => { impl HTMLRender for $t {  		}  		Ok(())  	} -}}} -impl_render_html_image!(e::Image); -impl_render_html_image!(e::ImageInline); +}  impl HTMLRender for e::DoctestBlock {  	fn render_html<W>(&self, _renderer: &mut HTMLRenderer<W>) -> Result<(), Error> where W: Write { | 
