diff options
Diffstat (limited to 'pandoc-filter-diagram.md')
-rw-r--r-- | pandoc-filter-diagram.md | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/pandoc-filter-diagram.md b/pandoc-filter-diagram.md index 86081d4..30e3cf5 100644 --- a/pandoc-filter-diagram.md +++ b/pandoc-filter-diagram.md @@ -47,7 +47,7 @@ and is not referenced as an external image. ~~~scenario given an installed Rust program pandoc-filter-diagram given file pikchr.md -when I run pandoc --filter subplot-filter pikchr.md -o pikchr.html +when I run pandoc --filter pandoc-filter-diagram pikchr.md -o pikchr.html then file pikchr.html matches regex /img src="data:image/svg\+xml;base64,/ ~~~ @@ -84,7 +84,7 @@ HTML output, not referenced as an external image. ~~~scenario given an installed Rust program pandoc-filter-diagram given file dot.md -when I run pandoc --filter subplot-filter dot.md -o dot.html +when I run pandoc --filter pandoc-filter-diagram dot.md -o dot.html then file dot.html matches regex /img src="data:image/svg\+xml;base64,/ ~~~ @@ -123,7 +123,7 @@ the HTML output, not referenced as an external image. ~~~scenario given an installed Rust program pandoc-filter-diagram given file plantuml.md -when I run pandoc --filter subplot-filter plantuml.md -o plantuml.html +when I run pandoc --filter pandoc-filter-diagram plantuml.md -o plantuml.html then file plantuml.html matches regex /img src="data:image/svg\+xml;base64,/ ~~~ @@ -202,7 +202,7 @@ HTML output, not referenced as an external image. ~~~scenario given an installed Rust program pandoc-filter-diagram given file roadmap.md -when I run pandoc --filter subplot-filter roadmap.md -o roadmap.html +when I run pandoc --filter pandoc-filter-diagram roadmap.md -o roadmap.html then file roadmap.html matches regex /img src="data:image/svg\+xml;base64,/ ~~~ @@ -252,3 +252,29 @@ blocked: - next ~~~ ~~~~~~~~ + + +# Command line tool + +The crate provides a command line tool `pandoc-filter-diagram`, for +use with the `pandoc --filter` option. By default, it ignores any +errors, but if the `PANDOC_FILTER_FAIL` environment variable is set +to 1, it fails if there were any errors. This scenario verifies that +this happens. The happy cases are already verified by other scenarios, +so this one only verifies handling of bad input. + +~~~scenario +given an installed Rust program pandoc-filter-diagram +given file bad.md +when I run pandoc --filter pandoc-filter-diagram bad.md -o bad.html +then exit code is 0 +when I try to run env PANDOC_FILTER_FAIL=1 pandoc --filter pandoc-filter-diagram bad.md -o bad.html +then command fails +~~~ + +~~~{#bad.md .file .markdown .numberLines} +trigraph "example" { +thing -> other +} +~~~ + |