summaryrefslogtreecommitdiff
path: root/html2markdown
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 /html2markdown
parent2763382dd803916e34e6575904147d7e3594a7f6 (diff)
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 'html2markdown')
-rw-r--r--html2markdown7
1 files changed, 7 insertions, 0 deletions
diff --git a/html2markdown b/html2markdown
index 4320ce9b1..66370c3fa 100644
--- a/html2markdown
+++ b/html2markdown
@@ -22,6 +22,13 @@ for p in pandoc tidy; do
}
done
+ALL="$*"
+ARGS=${ALL%%-- *}
+REST=${ALL#$ARGS}
+
+REST=${REST#--}
+PANDOC_OPTS=${REST:-$PANDOC_OPTS}
+
if [ -z "$1" ] || [ -f $1 ]; then
tidy -utf8 $1 2>/dev/null | \
pandoc $PANDOC_OPTS -r html -w markdown -s | \