aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/App/Opt.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-10-08Use th to derive json instance for LineEnding.John MacFarlane1-16/+4
2019-10-07Text.Pandoc.Options: change To/FromJSON instances for...John MacFarlane1-1/+3
HTMLMathMethod, CiteMethod, ObfuscationMethod, TrackChanges, WrapOption, TopLevelDivision, ReferenceLocation, HTMLSlideVariant. In each case we use lowercase (or hyphenated lowercase) for constructors to line up more closely with command-line option values. This is a breaking change for those who manually decode or encode JSON for these data types (e.g. for ReaderOptions or WriterOptions). See #5790.
2019-10-07Remove derive_json_via_th flag; always use TH.John MacFarlane1-14/+0
This cuts down on code duplication and reduces the chance for errors. See #4083.
2019-10-07Use typeMismatch.John MacFarlane1-1/+2
2019-10-06T.P.App.Opt: custom FromJSON instance for LineEnding.John MacFarlane1-8/+17
So either CRLF or crlf will work.
2019-10-06Opt: Change optHighlightStyle to a Maybe String instead of Maybe Style.John MacFarlane1-3/+2
Do the parsing/loading of themes later, after option parsing.
2019-10-06Text.Pandoc.App.Opt: Remove optBaseHeaderLevel from Opt.John MacFarlane1-2/+0
We now just use optShiftHeadingLevelBy, to avoid redundancy.
2019-10-06Text.Pandoc.App.Opt: Change optShiftHeadingLevel to optShiftHeadingLevelBy...John MacFarlane1-2/+2
to match the option.
2019-10-06Text.Pandoc.App.Opt: more convenient To/FromJSON instances.John MacFarlane1-5/+9
Make the field names like `strip-empty-paragraphs` rather than `optStripEmptyParagraphs`.
2019-09-10Add --shift-heading-level-by option.John MacFarlane1-0/+2
Deprecate --base-heading-level. The new option does everything the old one does, but also allows negative shifts. It also promotes the document metadata (if not null) to a level-1 heading with a +1 shift, and demotes an initial level-1 heading to document metadata with a -1 shift. This supports converting documents that use an initial level-1 heading for the document title. Closes #5615.
2019-08-24Change optMetadataFile type from Maybe to List (#5702)Owen McGrath1-2/+2
Changed optMetadataFile from `Maybe FilePath` to `[FilePath]`. This allows for multiple YAML metadata files to be added. The new default value has been changed from `Nothing` to `[]`. To account for this change in `Text.Pandoc.App`, `metaDataFromFile` now operates on two `mapM` calls (for `readFileLazy` and `yamlToMeta`) and a fold. Added a test (command/5700.md) which tests this functionality and updated MANUAL.txt, as per the contributing guidelines. With the current behavior, using `foldr1 (<>)`, values within files specified first will be used over those in later files. (If the reverse of this behavior would be preferred, it should be fixed by changing foldr1 to foldl1.)
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-28Shared: add filterIpynbOutput. [API change]John MacFarlane1-0/+2
Add command line option `--ipynb-output=all|none|best`. Closes #5339.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2018-11-06T.P.App: extract Opt into separate moduleAlbert Krewinkel1-0/+221
The new Opt module has only a few dependencies. This is important for compile-times during development, as Template Haskell containing modules are be recompiled whenever a (transitive) dependency changes.