aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html2markdown7
-rw-r--r--latex2markdown10
-rw-r--r--markdown2html9
-rw-r--r--markdown2latex9
4 files changed, 32 insertions, 3 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 | \
diff --git a/latex2markdown b/latex2markdown
index 4f5efef83..d6a991307 100644
--- a/latex2markdown
+++ b/latex2markdown
@@ -21,4 +21,12 @@ for p in pandoc; do
}
done
-iconv -t utf-8 $* | pandoc $PANDOC_OPTS -r latex -w markdown -s | 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 -r latex -w markdown -s | \
+ iconv -f utf-8
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
diff --git a/markdown2latex b/markdown2latex
index 0fc2077cb..4f9e7d8f4 100644
--- a/markdown2latex
+++ b/markdown2latex
@@ -21,4 +21,11 @@ for p in pandoc; do
}
done
-iconv -t utf-8 $* | pandoc $PANDOC_OPTS -w latex -s | 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 -w latex -s | iconv -f utf-8