From 1ce6627eb3c82b110eb24a28fa7697e271c21ffa Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Sat, 16 May 2020 22:54:30 +0200 Subject: toPDF.sh didn't check for file to actually contain plantUML diagram. --- pdfs/toPDF.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdfs/toPDF.sh b/pdfs/toPDF.sh index 0134803..2c520a4 100755 --- a/pdfs/toPDF.sh +++ b/pdfs/toPDF.sh @@ -35,7 +35,8 @@ case "$extension" in plantUmlCode="" plantUmlScriptPath="${pandocLuaScriptsFolder}/${pandocPlantUmlLuaScript}" [ -f "$plantUmlScriptPath" ] && [ -n "$PLANTUML" ] && - plantUmlCode="--lua-filter $plantUmlScriptPath" + grep '```{\.plantuml' "$sourceFile" >/dev/null + plantUmlCode="--lua-filter $plantUmlScriptPath" pandoc --pdf-engine=xelatex "$sourceFile" $plantUmlCode -o "$targetFile" > ~/logs/toPDF.log ;; esac -- cgit v1.2.1