diff options
| author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-01-01 20:43:48 +0000 |
|---|---|---|
| committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-01-01 20:43:48 +0000 |
| commit | a505f70f0b33b7fa52ad4d8df77ebff090b36d01 (patch) | |
| tree | aaf7a2a3df11064807b2abee10f3c71f1817f5b5 | |
| parent | e37df6db69fc1d7832db19316ca7beb9cd54a24b (diff) | |
| download | pandoc-a505f70f0b33b7fa52ad4d8df77ebff090b36d01.tar.gz | |
Made -H, -A, and -B cumulative: if they are specified multiple times,
multiple files will be included.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1165 788f1e2b-df1e-0410-8736-df70ead52e1b
| -rw-r--r-- | Main.hs | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -241,8 +241,9 @@ options = , Option "H" ["include-in-header"] (ReqArg (\arg opt -> do + let old = optIncludeInHeader opt text <- readFile arg - return opt { optIncludeInHeader = fromUTF8 text, + return opt { optIncludeInHeader = old ++ fromUTF8 text, optStandalone = True }) "FILENAME") "" -- "File to include at end of header (implies -s)" @@ -250,16 +251,18 @@ options = , Option "B" ["include-before-body"] (ReqArg (\arg opt -> do + let old = optIncludeBeforeBody opt text <- readFile arg - return opt { optIncludeBeforeBody = fromUTF8 text }) + return opt { optIncludeBeforeBody = old ++ fromUTF8 text }) "FILENAME") "" -- "File to include before document body" , Option "A" ["include-after-body"] (ReqArg (\arg opt -> do + let old = optIncludeAfterBody opt text <- readFile arg - return opt { optIncludeAfterBody = fromUTF8 text }) + return opt { optIncludeAfterBody = old ++ fromUTF8 text }) "FILENAME") "" -- "File to include after document body" |
