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 efdc799..38fb0d3 100644 --- a/src/directive/mod.rs +++ b/src/directive/mod.rs @@ -14,6 +14,7 @@ pub enum Directive { Meta(Meta), Img(Img), + Tag(Tag), } impl TryFrom<ParsedDirective> for Directive { @@ -49,6 +50,10 @@ impl TryFrom<ParsedDirective> for Directive { Self::check_args(&p, Meta::REQUIRED, Meta::ALLOWED, Meta::ALLOW_ANY_UNNAMED)?; Directive::Meta(Meta::from(p)) } + "tag" => { + Self::check_args(&p, Tag::REQUIRED, Tag::ALLOWED, Tag::ALLOW_ANY_UNNAMED)?; + Directive::Tag(Tag::from(p)) + } _ => return Err(SiteError::UnknownDirective(p.name().into())), }; Ok(d) @@ -97,6 +102,7 @@ impl Directive { } Self::Img(x) => x.process(site, meta), Self::Meta(x) => x.process(site, meta), + Self::Tag(x) => x.process(site, meta), } } } @@ -106,3 +112,6 @@ use meta::Meta; mod img; pub use img::Img; + +mod tag; +use tag::Tag; |