aboutsummaryrefslogtreecommitdiff
path: root/markdown2html
diff options
context:
space:
mode:
Diffstat (limited to 'markdown2html')
-rw-r--r--markdown2html9
1 files changed, 8 insertions, 1 deletions
diff --git a/markdown2html b/markdown2html
index 280c1cf90..04ccf4c49 100644
--- a/markdown2html
+++ b/markdown2html
@@ -21,4 +21,11 @@ for p in pandoc; do
}
done
-iconv -t utf-8 $* | pandoc $PANDOC_OPTS | iconv -f utf-8
+ALL="$*"
+ARGS=${ALL%%-- *}
+REST=${ALL#$ARGS}
+
+REST=${REST#--}
+PANDOC_OPTS=${REST:-$PANDOC_OPTS}
+
+iconv -t utf-8 $ARGS | pandoc $PANDOC_OPTS | iconv -f utf-8