aboutsummaryrefslogtreecommitdiff
path: root/markdown2latex
diff options
context:
space:
mode:
Diffstat (limited to 'markdown2latex')
-rw-r--r--markdown2latex8
1 files changed, 4 insertions, 4 deletions
diff --git a/markdown2latex b/markdown2latex
index 4f9e7d8f4..3e4d1da24 100644
--- a/markdown2latex
+++ b/markdown2latex
@@ -22,10 +22,10 @@ for p in pandoc; do
done
ALL="$*"
-ARGS=${ALL%%-- *}
-REST=${ALL#$ARGS}
+ARGS=${ALL%% -- *} # only the part before ' -- ' delimiters is relevant
+set -- $ARGS
-REST=${REST#--}
+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
+iconv -t utf-8 $* | pandoc $PANDOC_OPTS -w latex -s | iconv -f utf-8