Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[filter] support Graphviz with panda #261

Open
wants to merge 2 commits into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tmp-*
tests/output/
tests/*.bats.log
missfont.log
.panda
9 changes: 9 additions & 0 deletions tests/extra.bats
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,15 @@ teardown() {
--output $OUT/$DIR/sample.pdf
}

## 58x: panda
@test "581: A PDF file with graphviz images" {
DIR=panda
$PANDOC $IN/$DIR/graphviz.md \
--template=eisvogel \
--lua-filter=/panda.lua \
--output $OUT/$DIR/graphviz.pdf
}

##
## 9xx: Other entrypoints
##
Expand Down
17 changes: 17 additions & 0 deletions tests/input/panda/graphviz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@


```{.dot render="{{dot}} "
img="panda_diagram_example"}
digraph {
rankdir=LR;
input -> pandoc -> output
pandoc -> panda -> {pandoc, diagrams}
{ rank=same; pandoc, panda }
{ rank=same; diagrams, output }
}
```


```{ render="{{dot}}"
include="tests/input/panda/hello.dot" }
```
4 changes: 4 additions & 0 deletions tests/input/panda/hello.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
digraph {
rankdir=LR;
Hello -> World;
}
2 changes: 2 additions & 0 deletions ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ RUN set -x && \
unzip \
# required for PDF meta analysis
poppler-utils \
# for panda
graphviz \
# clean up
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
Expand Down