aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-09-29 10:37:46 -0700
committerJohn MacFarlane <[email protected]>2022-09-29 10:37:46 -0700
commit931ccd03766f339ab1053b4d5ad8344f20733d5e (patch)
treee9480ad85d050afa2e5c1500a9de4e5acfd05587 /src
parent6227144216b35349cc5415233baae13f8d1cc886 (diff)
Remove deprecated option `--strip-empty-paragraphs`.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/App.hs5
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs8
-rw-r--r--src/Text/Pandoc/App/Opt.hs5
3 files changed, 1 insertions, 17 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index d5df55f93..9949a31db 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -66,7 +66,7 @@ import Text.Pandoc.Filter (Filter (JSONFilter, LuaFilter), Environment (..),
applyFilters)
import Text.Pandoc.PDF (makePDF)
import Text.Pandoc.SelfContained (makeSelfContained)
-import Text.Pandoc.Shared (eastAsianLineBreakFilter, stripEmptyParagraphs,
+import Text.Pandoc.Shared (eastAsianLineBreakFilter,
headerShift, isURI, tabFilter, uriPathToPath, filterIpynbOutput,
defaultUserDataDir, tshow, textToIdentifier)
import Text.Pandoc.Writers.Shared (lookupMetaString)
@@ -258,9 +258,6 @@ convertWithOpts' istty datadir opts = do
let transforms = (case optShiftHeadingLevelBy opts of
0 -> id
x -> (headerShift x :)) .
- (if optStripEmptyParagraphs opts
- then (stripEmptyParagraphs :)
- else id) .
(if extensionEnabled Ext_east_asian_line_breaks
readerExts &&
not (extensionEnabled Ext_east_asian_line_breaks
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index 50925c942..1a760d970 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -520,14 +520,6 @@ options =
"NUMBER")
"" -- "Headers base level"
- , Option "" ["strip-empty-paragraphs"]
- (NoArg
- (\opt -> do
- deprecatedOption "--strip-empty-paragraphs"
- "Use +empty_paragraphs extension."
- return opt{ optStripEmptyParagraphs = True }))
- "" -- "Strip empty paragraphs"
-
, Option "" ["track-changes"]
(ReqArg
(\arg opt -> do
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs
index 70adde3e3..d5e38b253 100644
--- a/src/Text/Pandoc/App/Opt.hs
+++ b/src/Text/Pandoc/App/Opt.hs
@@ -126,7 +126,6 @@ data Opt = Opt
, optFilters :: [Filter] -- ^ Filters to apply
, optEmailObfuscation :: ObfuscationMethod
, optIdentifierPrefix :: Text
- , optStripEmptyParagraphs :: Bool -- ^ Strip empty paragraphs
, optIndentedCodeClasses :: [Text] -- ^ Default classes for indented code blocks
, optDataDir :: Maybe FilePath
, optCiteMethod :: CiteMethod -- ^ Method to output cites
@@ -207,7 +206,6 @@ instance FromJSON Opt where
<*> o .:? "filters" .!= optFilters defaultOpts
<*> o .:? "email-obfuscation" .!= optEmailObfuscation defaultOpts
<*> o .:? "identifier-prefix" .!= optIdentifierPrefix defaultOpts
- <*> o .:? "strip-empty-paragraphs" .!= optStripEmptyParagraphs defaultOpts
<*> o .:? "indented-code-classes" .!= optIndentedCodeClasses defaultOpts
<*> o .:? "data-dir"
<*> o .:? "cite-method" .!= optCiteMethod defaultOpts
@@ -579,8 +577,6 @@ doOpt (k,v) = do
"identifier-prefix" ->
parseJSON v >>= \x ->
return (\o -> o{ optIdentifierPrefix = x })
- "strip-empty-paragraphs" ->
- parseJSON v >>= \x -> return (\o -> o{ optStripEmptyParagraphs = x })
"indented-code-classes" ->
parseJSON v >>= \x ->
return (\o -> o{ optIndentedCodeClasses = x })
@@ -738,7 +734,6 @@ defaultOpts = Opt
, optFilters = []
, optEmailObfuscation = NoObfuscation
, optIdentifierPrefix = ""
- , optStripEmptyParagraphs = False
, optIndentedCodeClasses = []
, optDataDir = Nothing
, optCiteMethod = Citeproc