aboutsummaryrefslogtreecommitdiff
path: root/markdown2html
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-13 15:22:41 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-13 15:22:41 +0000
commit574290c92f0c62298491134458bd98ceba151774 (patch)
treee86f4409c4d7cac5395b83339e05263a86eea830 /markdown2html
parent2763382dd803916e34e6575904147d7e3594a7f6 (diff)
downloadpandoc-574290c92f0c62298491134458bd98ceba151774.tar.gz
Modified wrapper scripts to pass all command-line options after --
to pandoc. These options override the environment variable PANDOC_OPTS, if it is set. (Note: these changes don't include changes to the documentation or man pages, or to markdown2pdf.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@95 788f1e2b-df1e-0410-8736-df70ead52e1b
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