diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2022-05-04 19:57:02 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2022-05-04 19:59:02 +0100 |
commit | 6448825a8f9beca0333464c9bfbc8fb96d142189 (patch) | |
tree | f4896b5b3cccb6d041d1469d9e43984f11126dd5 /src/visitor/typesetting.rs | |
parent | 12059fcb1ce8237e5587773043cd442e036531c2 (diff) | |
download | subplot-6448825a8f9beca0333464c9bfbc8fb96d142189.tar.gz |
(subplot): Add support for example blocks
In support of #256, this adds `example` as a permitted class and
ensures that we typeset it as though it were a file.
This includes linting it as though it were a file too.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/visitor/typesetting.rs')
-rw-r--r-- | src/visitor/typesetting.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/visitor/typesetting.rs b/src/visitor/typesetting.rs index 8d73f3e..da9c362 100644 --- a/src/visitor/typesetting.rs +++ b/src/visitor/typesetting.rs @@ -40,7 +40,7 @@ impl<'a> MutVisitor for TypesettingVisitor<'a> { Block::CodeBlock(attr, s) => { if is_class(attr, "scenario") { *block = typeset::scenario_snippet(self.bindings, s, &mut self.warnings) - } else if is_class(attr, "file") { + } else if is_class(attr, "file") || is_class(attr, "example") { *block = typeset::file_block(attr, s) } else if is_class(attr, "dot") { *block = typeset::dot_to_block(s, &mut self.warnings) |