aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/DokuWiki.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-30/+27
2017-03-01Writers: Use gets to access MonadState where possible (#3480)Alexander Krotov1-2/+2
2017-01-25Revert "Added page breaks into Pandoc."John MacFarlane1-2/+0
This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
2017-01-25Removed `--normalize` option and normalization functions from Shared.John MacFarlane1-4/+11
* Removed normalize, normalizeInlines, normalizeBlocks from Text.Pandoc.Shared. These shouldn't now be necessary, since normalization is handled automatically by the Builder monoid instance. * Remove `--normalize` command-line option. * Don't use normalize in tests. * A few revisions to readers so they work well without normalize.
2017-01-25Convert all writers to use PandocMonad.Jesse Rosenthal1-2/+3
Since PandocMonad is an instance of MonadError, this will allow us, in a future commit, to change all invocations of `error` to `throwError`, which will be preferable for the pure versions. At the moment, we're disabling the lua custom writers (this is temporary). This requires changing the type of the Writer in Text.Pandoc. Right now, we run `runIOorExplode` in pandoc.hs, to make the conversion easier. We can switch it to the safer `runIO` in the future. Note that this required a change to Text.Pandoc.PDF as well. Since running an external program is necessarily IO, we can be clearer about using PandocIO.
2017-01-25Adds support for pagebreaks (when it makes sense)Hubert Plociniczak1-1/+3
Update all writers to take into account page breaks. A straightforwad, far from complete, implementation of page breaks in selected writers. Readers will have to follow in the future as well.
2016-11-30Options: Removed writerStandalone, made writerTemplate a Maybe.John MacFarlane1-4/+3
Previously setting writerStandalone = True did nothing unless a template was provided in writerTemplate. Now a fragment will be generated if writerTemplate is Nothing; otherwise, the specified template will be used and standalone output generated. [API change]
2016-10-13Add support for the LineBlock element to writersAlbert Krewinkel1-2/+5
The following markup features are used to output the lines of the `LineBlock` element: - AsciiDoc: a `[verse]` block, - ConTeXt: text surrounded by `\startlines` and `\endlines`, - HTML: `div` with an per-element style setting to interpret the content as pre-wrapped, - Markdown: line blocks if the `line_blocks` extension is enabled, a simple paragraph with hard linebreaks otherwise, - Org: VERSE block, - RST: a line block, and - all other formats: a paragraph, containing hard linebreaks between lines. Custom lua writers should be updated to use the `LineBlock` element.
2016-03-08DokuWiki writer: use $$ for display math.John MacFarlane1-1/+4
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane1-1/+8
Added threefold wrapping option. * Command line option: deprecated `--no-wrap`, added `--wrap=[auto|none|preserve]` * Added WrapOption, exported from Text.Pandoc.Options * Changed type of writerWrapText in WriterOptions from Bool to WrapOption. * Modified Text.Pandoc.Shared functions for SoftBreak. * Supported SoftBreak in writers. * Updated tests. * Updated README. Closes #1701.
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane1-6/+18
mb21-new-image-attributes * Bumped version to 1.16. * Added Attr field to Link and Image. * Added `common_link_attributes` extension. * Updated readers for link attributes. * Updated writers for link attributes. * Updated tests * Updated stack.yaml to build against unreleased versions of pandoc-types and texmath. * Fixed various compiler warnings. Closes #261. TODO: * Relative (percentage) image widths in docx writer. * ODT/OpenDocument writer (untested, same issue about percentage widths). * Update pandoc-citeproc.
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane1-0/+1
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane1-1/+0
- The (non-exported) prelude is in prelude/Prelude.hs. - It exports Monoid and Applicative, like base 4.8 prelude, but works with older base versions. - It exports (<>) for mappend. - It hides 'catch' on older base versions. This allows us to remove many imports of Data.Monoid and Control.Applicative, and remove Text.Pandoc.Compat.Monoid. It should allow us to use -Wall again for ghc 7.10.
2015-08-07Updated readers, writers and README for link attributemb211-2/+2
2015-08-07Updated readers and writers for new image attribute parameter.John MacFarlane1-4/+16
(mb21)
2015-07-13DokuWiki: write $..$ instead of <math>..</math>Tiziano Müller1-1/+1
MathJax seems currently to be the only maintained math rendering extension for DokuWiki and it uses $..$ instead of <math>..</math>.
2015-06-07DokuWiki writer: Use proper `<code>` tags for code blocks.John MacFarlane1-4/+4
Closes #2213.
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2015-02-04Append newline to the LineBreak of various writersTim Lin1-1/+1
This change improves output formatting of content with a large amount of force line breaks, such as line-blocks. The following writers are affected: * Dokuwiki * HTML * EPUB (via HTML) * LaTeX * MediaWiki * OpenDocument * Texinfo This commit resolves #1924
2014-11-09DokuWiki writer: fix external imagesTimothy Humphries1-2/+6
Handles #1739. Preface relative links with ":", absolute URIs without.
2014-11-04DokuWiki writer: Better handling of block quotes.John MacFarlane1-4/+2
This change ensures that multiple paragraph blockquotes are rendered using native `>` rather than as HTML. Closes #1738.
2014-08-30DokuWiki writer: Make tables prettier by aligning columns.John MacFarlane1-40/+22
Also cleaned up crufty code and added tests.
2014-08-30DokuWiki writer: Handle table cell alignments.John MacFarlane1-27/+19
Closes #1566.
2014-08-30DokuWiki writer: Use backslash newlines in table cells.Jesse Rosenthal1-10/+36
Write out strings in table cells with backslash linebreaks in place of newlines. We also want to remove the first two spaces of an indent in lists.
2014-08-27DokuWiki Writer: Refactor to use Reader monadMatthew Pickering1-47/+56
2014-08-27DokuWiki Writer: Hlint cleanupMatthew Pickering1-27/+27
2014-08-27DokuWiki Writer: Qualified all importsMatthew Pickering1-5/+10
2014-07-13Use raw HTML for complex block quotes.John MacFarlane1-1/+7
As far as I can see, dokuwiki markup is pretty limited in what can go in a `>` block quote: just a single line of paragraph text. (#1398)
2014-07-13DokuWiki writer: Use raw HTML for complex lists...John MacFarlane1-13/+40
as in the mediawiki writer. The dokuwiki markup isn't able to handle multiple block-level items within a list item, except in a few special cases (e.g. code blocks, and these must be started on the same line as the preceding paragraph). So we fall back to raw HTML for these. Perhaps there is a better solution. We can "fake" multiple paragraphs within list items using hard line breaks (`\\`), but we must keep everything on one line. (#1398)
2014-07-13DokuWiki writer: Normalize to collapse adjacent raw HTML blocks.John MacFarlane1-1/+1
2014-07-13DokuWiki writer: More tweaks to email links. (#1398)John MacFarlane1-4/+3
2014-07-13DokuWiki writer: Use pointy brackets for email links.John MacFarlane1-0/+2
(#1398)
2014-07-13Dokuwiki writer: More idiomatic code for escaping.John MacFarlane1-2/+4
2014-07-13DokuWiki writer: More raw HTML fixes. (#1398)John MacFarlane1-2/+4
* Use uppercase HTML tags for block-level content, lowercase for inline. * Newline before closing HTML tag.
2014-07-13DokuWiki writer: Fix raw inlines and blocks.John MacFarlane1-6/+6
* mediawiki > dokuwiki * ignore raw content other than html or dokuwiki. (#1398)
2014-07-13Merge branch 'claremacrae-dokuwiki'.John MacFarlane1-2/+4
Use removeFormatting from Shared instead of the custom unfancy function.
2014-07-08DokuWiki writer: Remove broken formatting from headings (#1398)Clare Macrae1-1/+11
2014-07-08Put myself as maintainer (#1398)Clare Macrae1-1/+1
2014-07-02DokuWiki writer: Span no longer swallows textClare Macrae1-6/+2
2014-07-02DokuWiki writer: Remove todos that I have already done.Clare Macrae1-2/+0
2014-07-02DokuWiki writer: Retain unknown RawBlock and RawInline textClare Macrae1-2/+2
This added \cite and \begin latex to the testuite output.
2014-07-02DokuWiki output: Implement blockquotes properly Clare Macrae1-2/+2
TODO Also implement nested blockquotes.
2014-07-02DokuWiki writer: remove unused codeClare Macrae1-25/+0
2014-07-01Remove stray <div> and </div> from DokuWiki output (#386)Clare Macrae1-5/+2
2014-07-01Improved HTML Blocks in DokuWiki output (#386)Clare Macrae1-1/+1
For example, this fixes the display of a broken table, and it also fixes the various HTML horizontal rules.
2014-06-30Disable warnings about unused parameters.Clare Macrae1-2/+2
2014-06-29Updated Copyright year, for consistency with MediaWiki.hsClare Macrae1-2/+2
2014-06-29Updated DokuWiki code and tests to work with latest code from jgm.Clare Macrae1-6/+22
The new code was got from inspecting changes in MediaWiki.hs This slightly changes the output of Div blocks, but I'm not convinced the original behaviour was really correct anyway. The code for handling Span does nothing for now, until I can work out the desired behaviour, and add tests for it.
2013-08-28Implement definition lists in dokuwiki writer (#386) - credit: James Smaldon claremacrae1-31/+24