aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Muse.hs
AgeCommit message (Collapse)AuthorFilesLines
2021-03-19Protect partial uses of maximum with NonEmpty.John MacFarlane1-3/+6
2020-04-28Support new Underline element in readers and writers (#6277)Vaibhav Sagar1-0/+7
Deprecate `underlineSpan` in Shared in favor of `Text.Pandoc.Builder.underline`.
2020-04-15Adapt to the newest Table type, fix some previous adaptation issuesdespresc1-1/+1
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
2020-04-15Remove the onlySimpleCellBodies function from Shareddespresc1-1/+1
2020-04-15Implement the new Table typedespresc1-4/+5
2020-03-22Finer grained imports of Text.Pandoc.Class submodules (#6203)Albert Krewinkel1-1/+1
This should speed-up recompilation after changes in `Text.Pandoc.Class`, as the number of modules affected by a change will be smaller in general. It also offers faster insights into the parts of `T.P.Class` used within a module.
2020-03-15Use implicit Prelude (#6187)Albert Krewinkel1-2/+0
* Use implicit Prelude The previous behavior was introduced as a fix for #4464. It seems that this change alone did not fix the issue, and `stack ghci` and `cabal repl` only work with GHC 8.4.1 or newer, as no custom Prelude is loaded for these versions. Given this, it seems cleaner to revert to the implicit Prelude. * PandocMonad: remove outdated check for base version Only base versions 4.9 and later are supported, the check for `MIN_VERSION_base(4,8,0)` is therefore unnecessary. * Always use custom prelude Previously, the custom prelude was used only with older GHC versions, as a workaround for problems with ghci. The ghci problems are resolved by replacing package `base` with `base-noprelude`, allowing for consistent use of the custom prelude across all GHC versions.
2020-03-13Update copyright year (#6186)Albert Krewinkel1-1/+1
* Update copyright year * Copyright: add notes for Lua and Jira modules
2020-02-07Apply linter suggestions. Add fix_spacing to lint target in Makefile.John MacFarlane1-1/+1
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc1-108/+114
PR #5884. + Use pandoc-types 1.20 and texmath 0.12. + Text is now used instead of String, with a few exceptions. + In the MediaBag module, some of the types using Strings were switched to use FilePath instead (not Text). + In the Parsing module, new parsers `manyChar`, `many1Char`, `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`, `mantyUntilChar` have been added: these are like their unsuffixed counterparts but pack some or all of their output. + `glob` in Text.Pandoc.Class still takes String since it seems to be intended as an interface to Glob, which uses strings. It seems to be used only once in the package, in the EPUB writer, so that is not hard to change.
2019-10-04hlint Muse writerAlexander Krotov1-1/+1
2019-09-28More throwError in place of fail.John MacFarlane1-1/+2
2019-09-28Replace some more fails with throwErrors.John MacFarlane1-1/+2
2019-09-28Use throwError instead of fail when appropriate.John MacFarlane1-1/+4
2019-09-28Use Prelude.fail to avoid ambiguity with fail from GHC.Base.John MacFarlane1-3/+3
2019-08-25Use new doctemplates, doclayout.John MacFarlane1-28/+28
+ Remove Text.Pandoc.Pretty; use doclayout instead. [API change] + Text.Pandoc.Writers.Shared: remove metaToJSON, metaToJSON' [API change]. + Text.Pandoc.Writers.Shared: modify `addVariablesToContext`, `defField`, `setField`, `getField`, `resetField` to work with Context rather than JSON values. [API change] + Text.Pandoc.Writers.Shared: export new function `endsWithPlain` [API change]. + Use new templates and doclayout in writers. + Use Doc-based templates in all writers. + Adjust three tests for minor template rendering differences. + Added indentation to body in docbook4, docbook5 templates. The main impact of this change is better reflowing of content interpolated into templates. Previously, interpolated variables were rendered independently and intepolated as strings, which could lead to overly long lines. Now the templates interpolated as Doc values which may include breaking spaces, and reflowing occurs after template interpolation rather than before.
2019-07-28Use doctemplates 0.3, change type of writerTemplate.John MacFarlane1-4/+5
* Require recent doctemplates. It is more flexible and supports partials. * Changed type of writerTemplate to Maybe Template instead of Maybe String. * Remove code from the LaTeX, Docbook, and JATS writers that looked in the template for strings to determine whether it is a book or an article, or whether csquotes is used. This was always kludgy and unreliable. To use csquotes for LaTeX, set `csquotes` in your variables or metadata. It is no longer sufficient to put `\usepackage{csquotes}` in your template or header includes. To specify a book style, use the `documentclass` variable or `--top-level-division`. * Change template code to use new API for doctemplates.
2019-07-14Muse: add RTL supportAlexander Krotov1-5/+9
Closes #5551
2019-05-27consolidate simple-table detection (#5524)Mauro Bieg1-11/+1
add `onlySimpleTableCells` to `Text.Pandoc.Shared` [API change] This fixes an inconsistency in the HTML reader, which did not treat tables with `<p>` inside cells as simple.
2019-05-25Muse writer: do not escape empty line after <br>Alexander Krotov1-4/+5
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-18hlint MuseAlexander Krotov1-2/+2
2019-02-18Muse writer: escape secondary notesAlexander Krotov1-7/+10
2019-02-18Move a comment in Muse WriterAlexander Krotov1-1/+1
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-15Muse writer: output tables as grid tables if they have multi-line cellsAlexander Krotov1-1/+13
2018-11-14Muse writer: indent simple tables only on the top levelAlexander Krotov1-4/+5
2018-11-14Muse writer: simplify "simpleTable"Alexander Krotov1-7/+4
2018-11-14Muse writer: remove outdated commentsAlexander Krotov1-3/+0
2018-11-13Muse writer: output tables with one column as grid tablesAlexander Krotov1-1/+1
2018-11-11Text.Pandoc.Shared: add parameter to uniqueIdent, inlineListToIdentifier.John MacFarlane1-1/+1
The parameter is Extensions. This allows these functions to be sensitive to the settings of `Ext_gfm_auto_identifiers` and `Ext_ascii_identifiers`. This allows us to use `uniqueIdent` in the CommonMark reader, replacing some custom code. It also means that `gfm_auto_identifiers` can now be used in all formats. Semantically, `gfm_auto_identifiers` is now a modifier of `auto_identifiers`; for identifiers to be set, `auto_identifiers` must be turned on, and then the type of identifier produced depends on `gfm_auto_identifiers` and `ascii_identifiers` are set. Closes #5057.
2018-11-06hlint Muse writerAlexander Krotov1-1/+1
2018-11-05Muse writer: add support for --reference-location=Alexander Krotov1-6/+44
Address #107
2018-10-25Muse writer: add support for grid tablesAlexander Krotov1-23/+35
2018-10-23Fix Muse writer styleAlexander Krotov1-42/+42
2018-10-23Muse writer: use length instead of realLength to calculate definition ↵Alexander Krotov1-1/+2
indentation Muse parsers don't take character width into account when calculating indentation.
2018-10-23Muse writer: do not insert newline before listsAlexander Krotov1-3/+3
2018-10-23Muse writer: code cleanupAlexander Krotov1-4/+2
2018-10-22Reduce code duplication in Muse writerAlexander Krotov1-34/+18
2018-10-22hlint Muse writerAlexander Krotov1-5/+3
2018-10-21Muse writer: use lightweight markup after </em> tagAlexander Krotov1-0/+1
2018-10-09hlint Muse writerAlexander Krotov1-4/+4
2018-09-16Muse writer: replace newlines in strings with spacesAlexander Krotov1-1/+7
2018-09-16Muse writer: output headers without asterisks if not on the top levelAlexander Krotov1-2/+3
2018-09-12Muse writer: never wrap definition list termsAlexander Krotov1-1/+1
2018-09-11Muse writer: set envInsideBlock = True when rendering notesAlexander Krotov1-1/+2
2018-09-11Muse writer: use "" instead of [] for empty StringAlexander Krotov1-1/+1
2018-09-11Muse writer: check for whitespace in the beginning and end of Str'sAlexander Krotov1-0/+2
2018-09-11Muse writer: escape -, ; and > in the beginning of stringsAlexander Krotov1-3/+6
2018-09-11Muse writer: escape list markers in the beginning of notesAlexander Krotov1-1/+4