From 19486ee0e17b12ed5a0c800c8cd8e43fe3522065 Mon Sep 17 00:00:00 2001 From: roktas Date: Mon, 13 Nov 2006 16:34:07 +0000 Subject: * Add PANDOC_OPTS support to 'markdown2pdf'. * Sanitize comand line handling a bit in all wrappers: + Correct delimiters syntax should be ' -- '. + Print warning for extra arguments which are ignored. + Instead of positional arguments use named variables whenever appropriate. git-svn-id: https://pandoc.googlecode.com/svn/trunk@97 788f1e2b-df1e-0410-8736-df70ead52e1b --- markdown2html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'markdown2html') diff --git a/markdown2html b/markdown2html index 04ccf4c49..3c8647d77 100644 --- a/markdown2html +++ b/markdown2html @@ -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 | iconv -f utf-8 +iconv -t utf-8 $* | pandoc $PANDOC_OPTS | iconv -f utf-8 -- cgit v1.2.3