From 961b77f41cb92b81a29d5011e6483835d25ba15a Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Fri, 30 Sep 2022 20:17:30 +0200 Subject: Fixed an error in toPDF.sh which caused pandoc to always try running a lua script. --- pdfs/toPDF.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pdfs/toPDF.sh b/pdfs/toPDF.sh index cfc9863..c9a35d7 100755 --- a/pdfs/toPDF.sh +++ b/pdfs/toPDF.sh @@ -34,9 +34,10 @@ case "$extension" in *) plantUmlCode="" plantUmlScriptPath="${pandocLuaScriptsFolder}/${pandocPlantUmlLuaScript}" - [ -f "$plantUmlScriptPath" ] && [ -n "$PLANTUML" ] && - grep '```{\.plantuml' "$sourceFile" >/dev/null - plantUmlCode="--lua-filter $plantUmlScriptPath" + [ -f "$plantUmlScriptPath" ] && + [ -n "$PLANTUML" ] && + grep -q '```{\.plantuml' "$sourceFile" && + plantUmlCode="--lua-filter $plantUmlScriptPath" pandoc --pdf-engine="$texengine" "$sourceFile" $plantUmlCode -o "$targetFile" > ~/logs/toPDF.log ;; esac -- cgit v1.2.1