aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/DokuWiki.hs
AgeCommit message (Collapse)AuthorFilesLines
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-10-29Removed useless notes state in DokuWiki writer.John MacFarlane1-5/+2
2017-10-29hlint suggestions.John MacFarlane1-14/+10
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane1-2/+2
2017-08-02DokuWiki reader: better handling for code block in list item.John MacFarlane1-2/+8
Closes #3824.
2017-06-20Writers: adjusted for renderTemplate' changes.John MacFarlane1-1/+1
Now we raise a proper error on template failure.
2017-06-17Use Control.Monad.State.Strict throughout.John MacFarlane1-1/+1
This gives 20-30% speedup and reduction of memory usage in most of the writers.
2017-06-11Switched Writer types to use Text.John MacFarlane1-3/+4
* XML.toEntities: changed type to Text -> Text. * Shared.tabFilter -- fixed so it strips out CRs as before. * Modified writers to take Text. * Updated tests, benchmarks, trypandoc. [API change] Closes #3731.
2017-05-23Shared: Provide custom isURI that rejects unknown schemes [isURI]Albert Krewinkel1-2/+1
We also export the set of known `schemes`. The new function replaces the function of the same name from `Network.URI`, as the latter did not check whether a scheme is well-known. E.g. MediaWiki wikis frequently feature pages with names like `User:John`. These links were interpreted as URIs, thus turning internal links into global links. This is prevented by also checking whether the scheme of a URI is frequently used (i.e. is IANA registered or an otherwise well-known scheme). Fixes: #2713 Update set of well-known URIs from IANA list All official IANA schemes (as of 2017-05-22) are included in the set of known schemes. The four non-official schemes doi, isbn, javascript, and pmid are kept.
2017-05-13Update dates in copyright noticesAlbert Krewinkel1-2/+2
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-03-12Converted DokuWiki writer to use PandocMonad.John MacFarlane1-25/+34
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