diff options
Diffstat (limited to 'src/document_tree')
| -rw-r--r-- | src/document_tree/extra_attributes.rs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/document_tree/extra_attributes.rs b/src/document_tree/extra_attributes.rs index 916ba41..2019dec 100644 --- a/src/document_tree/extra_attributes.rs +++ b/src/document_tree/extra_attributes.rs @@ -85,19 +85,10 @@ impl_extra!(TargetInline { anonymous: bool, }); impl_extra!(RawInline { space: FixedSpace, format: Vec<NameToken> }); -impl_extra!(#[derive(Debug,Serialize)] ImageInline { - #[serde(serialize_with = "serialize_url")] - uri: Url, - align: Option<AlignHV>, - alt: Option<String>, - height: Option<Measure>, - width: Option<Measure>, - scale: Option<u8>, - #[serde(serialize_with = "serialize_opt_url")] - target: Option<Url>, // Not part of the DTD but a valid argument -}); -impl ImageInline { - pub fn new(uri: Url) -> ImageInline { ImageInline { +pub type ImageInline = Image; + +impl Image { + pub fn new(uri: Url) -> Image { Image { uri: uri, align: None, alt: None, |
