diff options
Diffstat (limited to 'src/directive/mod.rs')
-rw-r--r-- | src/directive/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/directive/mod.rs b/src/directive/mod.rs index 38fb0d3..a97f3a5 100644 --- a/src/directive/mod.rs +++ b/src/directive/mod.rs @@ -14,6 +14,7 @@ pub enum Directive { Meta(Meta), Img(Img), + Inline(Inline), Tag(Tag), } @@ -46,6 +47,10 @@ impl TryFrom<ParsedDirective> for Directive { Self::check_args(&p, Img::REQUIRED, Img::ALLOWED, Img::ALLOW_ANY_UNNAMED)?; Directive::Img(Img::from(p)) } + "inline" => { + Self::check_args(&p, Inline::REQUIRED, Inline::ALLOWED, Inline::ALLOW_ANY_UNNAMED)?; + Directive::Inline(Inline::from(p)) + } "meta" => { Self::check_args(&p, Meta::REQUIRED, Meta::ALLOWED, Meta::ALLOW_ANY_UNNAMED)?; Directive::Meta(Meta::from(p)) @@ -101,6 +106,7 @@ impl Directive { panic!("directive {:?} may only be used in parsing tests", self) } Self::Img(x) => x.process(site, meta), + Self::Inline(x) => x.process(site, meta), Self::Meta(x) => x.process(site, meta), Self::Tag(x) => x.process(site, meta), } @@ -113,5 +119,8 @@ use meta::Meta; mod img; pub use img::Img; +mod inline; +pub use inline::Inline; + mod tag; use tag::Tag; |