aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs8
-rw-r--r--test/command/8956.md24
2 files changed, 26 insertions, 6 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index 22e824ade..e76344088 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -238,8 +238,16 @@ pdfEngines = nubOrd $ map snd engines
preprocessArgs :: [String] -> [String]
preprocessArgs [] = []
preprocessArgs ("--":xs) = "--" : xs -- a bare '--' ends option parsing
+-- note that -strue is interpreted as -strue while
+-- -stmarkdown is interpreted as -s -tmarkdown
preprocessArgs (('-':c:d:cs):xs)
| isShortBooleanOpt c
+ , case toLower <$> (d:cs) of
+ "true" -> True
+ "false" -> True
+ _ -> False
+ = ('-':c:d:cs) : preprocessArgs xs
+ | isShortBooleanOpt c
, isShortOpt d = splitArg (c:d:cs) ++ preprocessArgs xs
preprocessArgs (x:xs) = x : preprocessArgs xs
diff --git a/test/command/8956.md b/test/command/8956.md
index 1f78afd63..02ab292ae 100644
--- a/test/command/8956.md
+++ b/test/command/8956.md
@@ -1,10 +1,12 @@
```
-% pandoc -itslidy
+% pandoc -iNtslidy
+# One
+
- one
- two
^D
-<div class="slide section level6">
-
+<div id="one" class="slide section level1" number="1">
+<h1><span class="header-section-number">1</span> One</h1>
<ul class="incremental">
<li>one</li>
<li>two</li>
@@ -18,13 +20,16 @@
after tab
```
^D
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ CodeBlock ( "" , [] , [] ) "\tafter tab" ]
````
```
-% pandoc -strue
+% pandoc -sfalse
+hi
^D
-2> Could not find data file templates/default.rue
-=> 97
+<p>hi</p>
```
```
@@ -34,3 +39,10 @@ hi
<p>hi</p>
```
+```
+% pandoc --standalone=FALSE
+hi
+^D
+<p>hi</p>
+```
+