aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-08-26Simplify stack.yaml after cabal file changes.John MacFarlane1-1/+1
We don't need so many local ghc options now that they're specified in pandoc.cabal. I've kept `-fhide-source-paths` (in case we move this out of pandoc.cabal) and `-Wno-missing-home-modules` (which seems to be needed for `stack ghci` to work).
2019-08-26Cabal cleanup (#5693)Albert Krewinkel2-24/+11
* pandoc.cabal: remove conditionals for ghc < 8.0. Support for GHC 7.10 has been dropped. * pandoc.cabal: compile with `-Wcpp-undef` when possible * pandoc.cabal: compile with `-fhide-source-paths` if possible
2019-08-26parseFromString': reset stateLastStrPos to Nothing before parse.John MacFarlane1-0/+1
2019-08-26Use parseFromString' in Muse reader.John MacFarlane1-1/+1
Now that it is polymorphic, this is possible, and it's a better choice because it resets last string pos.
2019-08-26Fix inline parsing in grid table cells.John MacFarlane3-16/+18
* T.P.Parsing: Change type of `setLastStrPos` so it takes a `Maybe SourcePos` rather than a `SourcePos`. [API change] * T.P.Parsing: Make `parseFromString'` and `gridTableWith` and `gridTableWith'` polymorphic in the parser state, constraining it with `HasLastStrPosition`. [API change] Closes #5708.
2019-08-26Add test for issue #5708.John MacFarlane1-0/+12
2019-08-26Add ghc 8.8.1 to CI.John MacFarlane1-0/+7
2019-08-25Use dev version of doctemplates.John MacFarlane2-1/+7
2019-08-25Better message for PandocTemplateError.John MacFarlane1-1/+1
2019-08-25Makefile: add ghcid target.John MacFarlane1-1/+4
2019-08-25Update cabal.project to use released doctemplates.John MacFarlane1-5/+0
2019-08-25Use new doctemplates, doclayout.John MacFarlane61-3737/+3212
+ 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-08-25Got benchmarks working with ipynb.John MacFarlane1-2/+17
2019-08-25Don't add a newline if there's already one.John MacFarlane1-4/+5
2019-08-24Change optMetadataFile type from Maybe to List (#5702)Owen McGrath8-12/+25
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-08-23Use released pandoc-types.John MacFarlane2-6/+1
2019-08-23Require pandoc-types 1.17.6.John MacFarlane1-2/+2
2019-08-23Add test for #5690.John MacFarlane1-0/+16
2019-08-23Asciidoc writer: handle admonitions.John MacFarlane1-3/+22
Closes #5690.
2019-08-23RST reader: use title, not admonition-title, for admonition title.John MacFarlane1-1/+1
This puts RST reader into alignment with docbook reader.
2019-08-23Ensure proper nesting when we have long ordered list markers.John MacFarlane2-2/+16
Closes #5705.
2019-08-23docbook: richer parse for admonitions (#5593)Michael Peyton Jones1-16/+27
Fixes #1234. This parses admonitions not as a blockquote, but rather as a div with an appropriate class. We also handle titles for admonitions as a nested div with the "title" class. (I followed the behaviour of other docbook-to-html converters in this - there are clearly other ways you could encode it.) In general, the handling of elements with nested title elements is very inconsistent. I think we should make it consistent, but I'm leaivng that for later to make this a small change. Example: ```docbook <warning xml:id="someId"> <title>My title</title> <simpara>An admonition block</simpara> </warning> ``` goes to ```html <div id="someId" class="warning"> <div class="title">My title</div> <p>An admonition block</p> </div> ```
2019-08-23add proofState to settingsList (#5703)Krystof Beuermann1-0/+1
2019-08-16Circle CI: use fpco/stack-build:lts-13 as base imageAlbert Krewinkel1-1/+1
2019-08-16cabal.project: remove options unsupported by GHC 8.0Albert Krewinkel1-2/+2
2019-08-16Lua: improve function documentationsAlbert Krewinkel1-1/+4
2019-08-16Lua: traverse nested blocks and inlines in correct orderAlbert Krewinkel3-11/+62
Traversal methods are updated to use the new Walk module such that sequences with nested Inline (or Block) elements are traversed in the order in which they appear in the linearized document. Fixes: #5667
2019-08-16Lua: add module for AST element sequence traversalAlbert Krewinkel4-0/+120
Lua filters must be able to traverse sequences of AST elements and to replace elements by splicing sequences back in their place. Special `Walkable` instances can be used for this; those are provided in a new module `Text.Pandoc.Lua.Walk`.
2019-08-15pandoc.cabal: add cabal.project to extra-source-files.Albert Krewinkel1-1/+2
2019-08-14LaTeX reader: improve withRaw so it can handle cases where...John MacFarlane2-2/+12
the token string is modified by a parser (e.g. accent when it only takes part of a Word token). Closes #5686. Still not ideal, because we get the whole `\t0BAR` and not just `\t0` as a raw latex inline command. But I'm willing to let this be an edge case, since you can easily work around this by inserting a space, braces, or raw attribute. The important thing is that we no longer drop the rest of the document after a raw latex inline command that gobbles only part of a Word token!
2019-08-14Removed some needless lookaheads in Markdown reader.John MacFarlane1-2/+0
2019-08-14Rename test for 5685 -> 5684 (typo in last commit).John MacFarlane1-0/+0
Closes #5684. (Note that #5685 is NOT closed by previous commit.)
2019-08-14Add thin space when needed in LaTeX quote ligatures.John MacFarlane2-4/+15
Closes #5685.
2019-08-14MANUAL: link to YAML spec (#5687)Mauro Bieg1-4/+6
2019-08-13Fix multiline table for XWiki writer (#5683)Zihang Chen1-2/+4
Details at https://groups.google.com/forum/#!topic/pandoc-discuss/c861tTdCFTg Fix XWiki output for ``` +----------+----------+ | Col A | Col B | +==========+==========+ | Row A | * Item A | | | * Item B | +----------+----------+ ``` from (notice that the following XWiki code renders as a table followed by a singleton list) ``` |=Col A|=Col B |Row A|*. Item A *. Item B ``` to ``` |=Col A|=Col B |Row A|(((*. Item A *. Item B ))) ```
2019-08-11JIRA writer: Remove escapeStringForJira for code blocksJan-Otto Kröpke2-18/+18
2019-08-08Remove blank line (#5679)Leif Metcalf1-1/+0
2019-08-08Revert "Avoid a pointless Text -> String conversion on output."John MacFarlane1-14/+8
This reverts commit 87ce1ffbd97f6cb2785f9fbf05f68d3185f50675. This change caused a problem on Windows that we didn't have before; this needs looking into. https://ci.appveyor.com/project/jgm/pandoc/build/job/fxq96log042df8dk .\pandoc.exe -s --toc ..\MANUAL.txt -o MANUAL.html pandoc.exe: MANUAL.html: commitAndReleaseBuffer: invalid argument (invalid character) Command exited with code 1
2019-08-08lua-filters - avoid duplicate id element-components.John MacFarlane1-1/+1
2019-08-08Update lua-filters doc from lua sources.John MacFarlane1-678/+710
2019-08-08Fix links to Attr in lua-filters.doc.John MacFarlane1-7/+7
2019-08-08lua-filters.doc: make table narrower so it doesn't crowd out TOC.John MacFarlane1-11/+11
2019-08-07Avoid a pointless Text -> String conversion on output.John MacFarlane1-8/+14
2019-08-07Fix stack.yaml.John MacFarlane1-4/+2
2019-08-05Use dev version of pandoc-citeproc.John MacFarlane2-2/+6
2019-08-05Treat `ly` as verbatim too (#5671)Urs Liska1-0/+1
According to https://github.com/jgm/pandoc/issues/4725#issuecomment-399772217 not only the `lilypond` environment but also `ly` should be included in the verbatim list. @jperon https://github.com/jperon/lyluatex/issues/203
2019-08-05Version bump to 2.8 because of type changes for templates.John MacFarlane1-1/+1
2019-07-30Markdown writer: Don't assume Doc has Eq instance.John MacFarlane1-11/+13
It won't in a future version.
2019-07-30ConTeXt writer; don't use `== empty` with `Doc`, use `isEmpty`.John MacFarlane1-5/+5
2019-07-29Update emoji list in Text.Pandoc.Emoji.John MacFarlane2-8/+965
Done using tools/emojis.hs, which uses the list from the gem GitHub uses. Future updates can be done with this tool. Closes #5666.