diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-08-05 22:28:58 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-08-06 07:25:14 +0300 |
commit | ea1a5a1e9c837816a0c89793e13f032f2cba50e1 (patch) | |
tree | c75c1cf5e8f419ce13e160d246685a48ffba6dbd /src/directive/mod.rs | |
parent | a39707b18a498fa3519c3772ef5f80cdbd8d3af6 (diff) | |
download | riki-ea1a5a1e9c837816a0c89793e13f032f2cba50e1.tar.gz |
feat: add placeholder for the inline directive
Sponsored-by: author
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; |