diff --git a/git-latexdiff b/git-latexdiff index 397ad67..0c22f66 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -515,6 +515,13 @@ else bblexpand=() fi +ignore_errors_maybe() { + if [ "$compile_error" = 1 ] && [ "$ignorelatexerrors" = 1 ]; then + echo "LaTeX errors were found - but attempting to carry on." + compile_error=0 + fi +} + # Create flattened documents and keep for debugging if test "$flatten" = 1; then if [ "$bbl" = 1 ]; then @@ -597,10 +604,7 @@ fi verbose_done -if [ "$compile_error" = 1 ] && [ "$ignorelatexerrors" = 1 ]; then - echo "LaTeX errors were found - but attempting to carry on." - compile_error=0 -fi +ignore_errors_maybe if test $latex = 1; then dvips "$mainbase".dvi