fix for when markdown renderer is missing

This commit is contained in:
Jaromil 2015-12-22 18:58:51 +01:00
parent 926a2fafc6
commit 92a781b027
1 changed files with 7 additions and 4 deletions

11
render
View File

@ -297,13 +297,16 @@ render_html() {
# check which markdown parser is available in PATH
command -v pandoc > /dev/null
if [ "$?" = "0" ]; then parser="pandoc -f markdown_github -t html5"
if [[ $? = 0 ]]; then parser="pandoc -f markdown_github -t html5"
else command -v maruku > /dev/null
if [ "$?" = "0" ]; then parser="maruku --html-frag"
if [[ $? = 0 ]]; then parser="maruku --html-frag"
else command -v markdown > /dev/null;
if [ "$?" = "0" ]; then parser=markdown
if [[ $? = 0 ]]; then parser=markdown
else command -v multimarkdown > /dev/null
if [ "$?" = "0"]; then parser=multimarkdown
if [[ $? = 0 ]]; then parser=multimarkdown
else
error "no markdown renderer installed, please install pandoc or equivalent"
return 1
fi
fi
fi