Commit graph

40 commits

Author SHA1 Message Date
John MacFarlane
6bfaa5ad15 DokuWiki writer: use $$ for display math. 2016-03-08 10:08:14 -08:00
John MacFarlane
af7e782436 Modified readers to emit SoftBreak when appropriate. 2015-12-12 09:31:51 -08:00
John MacFarlane
536b6bf538 Implemented SoftBreak and new --wrap option.
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-12-11 23:55:08 -08:00
Tiziano Müller
f464e49142 DokuWiki: write $..$ instead of <math>..</math>
MathJax seems currently to be the only maintained math rendering
extension for DokuWiki and it uses $..$ instead of <math>..</math>.
2015-07-13 14:19:48 +02:00
John MacFarlane
7b4f077652 DokuWiki writer: Use proper <code> tags for code blocks.
Closes #2213.
2015-06-07 11:29:47 -07:00
Tim Lin
0c18f3a854 Append newline to the LineBreak of various writers
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
2015-02-04 22:42:22 -08:00
John MacFarlane
f3ac41937d DokuWiki writer: Better handling of block quotes.
This change ensures that multiple paragraph blockquotes are
rendered using native `>` rather than as HTML.

Closes #1738.
2014-11-04 14:52:19 -08:00
John MacFarlane
598d3ee23b Markdown reader: better handling of paragraph in div.
Previously text that ended a div would be parsed as Plain
unless there was a blank line before the closing div tag.

Test case:

    <div class="first">
    This is a paragraph.

    This is another paragraph.
    </div>

Closes #1591.
2014-08-31 12:55:47 -07:00
John MacFarlane
3e95fd586d Use raw HTML for complex block quotes.
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-13 16:15:45 -07:00
John MacFarlane
81088281de DokuWiki writer: Use raw HTML for complex lists...
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-13 16:04:29 -07:00
John MacFarlane
0ba2f0b8f9 DokuWiki writer: Normalize to collapse adjacent raw HTML blocks. 2014-07-13 15:48:01 -07:00
John MacFarlane
15956fcac7 DokuWiki writer: Updated tests. 2014-07-13 15:45:59 -07:00
Clare Macrae
c7431283d6 DokuWiki writer: Remove broken formatting from headings (#1398) 2014-07-08 22:05:04 +01:00
John MacFarlane
3d2f2ec0c6 Updated dokuwiki tests for latest changes to testsuite.native. 2014-07-07 16:25:41 -06:00
Clare Macrae
61cc983bea DokuWiki writer: Retain unknown RawBlock and RawInline text
This added \cite and \begin latex to the testuite output.
2014-07-02 21:40:12 +01:00
Clare Macrae
d234157d25 DokuWiki output: Implement blockquotes properly
TODO Also implement nested blockquotes.
2014-07-02 21:26:24 +01:00
Clare Macrae
244c4eee74 Remove stray <div> and </div> from DokuWiki output (#386) 2014-07-01 21:42:21 +01:00
Clare Macrae
0727579167 Improved HTML Blocks in DokuWiki output (#386)
For example, this fixes the display of a broken table, and 
it also fixes the various  HTML horizontal rules.
2014-07-01 21:21:09 +01:00
Clare Macrae
fdbf52b1cc Updated DokuWiki code and tests to work with latest code from jgm.
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.
2014-06-29 21:15:17 +01:00
claremacrae
78ae3c2492 Implement definition lists in dokuwiki writer (#386) - credit: James Smaldon 2013-08-28 08:09:42 +01:00
claremacrae
fe1040d283 Added failing test for definition list output in dokuwiki writer (#386) 2013-08-23 08:26:07 +01:00
claremacrae
6cc284cc8e Bullet and ordered lists now always simple in dokuwiki writer (#386) 2013-08-19 20:45:31 +01:00
claremacrae
883f119c87 Removed unnecessary line-break after hard break in dokuwiki writer (#386) 2013-08-19 08:09:52 +01:00
claremacrae
6d484bc55e Treat inline code blocks like <code> instead of <tt> in dokuwiki writer (#386)
Done because I noticed that in the Autolinks section of writer.dokuwiki, the URL in inlined code was getting auto-linked, when it wasn't supposed to.

This also meant that any inline code examples that had text that looked like dokuwiki syntax could break the formatting of later text.
2013-08-18 08:13:34 +01:00
claremacrae
0961d49912 Fixed inlined code in dokuwiki writer (#386) 2013-08-17 12:34:05 +01:00
claremacrae
4c48433a2a Don't add entities in <code> blocks in dokuwiki writer (#386) 2013-08-17 12:20:34 +01:00
claremacrae
573bd1b61b Implement <code> blocks in dokuwiki writer (#386) 2013-08-17 11:20:51 +01:00
claremacrae
e5004bcff0 Implement strikeout in dokuwiki writer (#386) 2013-08-06 07:43:32 +01:00
claremacrae
b14b2d6a85 Implement footnotes in dokuwiki writer (#386) 2013-07-28 19:19:33 +01:00
claremacrae
b5f86a665d Removed incorrect entity conversion in dokuwiki writer (#386) 2013-07-28 18:59:16 +01:00
claremacrae
51b8ce49f1 Implemented linebreaks in dokuwiki writer (#386) 2013-07-28 18:42:53 +01:00
Clare Macrae
5b04d063a1 Convert bullet and numbered lists in dokuwiki writer (#386) 2013-07-26 06:19:40 +01:00
Clare Macrae
97d81c8b10 Corrected part of the failing test for lists in dokuwiki writer (#386) 2013-07-26 05:10:05 +01:00
Clare Macrae
c561be95a1 Add failing test for bullet and numbered lists in dokuwiki writer (#386) 2013-07-15 20:20:37 +01:00
Clare Macrae
18565e149a Implement conversion of images in dokuwiki writer (#386) 2013-07-15 19:29:39 +01:00
Clare Macrae
b2a8731e32 Weak implementation of hyperlinks for dokuwiki (#386)
TODO Simplify the code
2013-07-15 09:35:04 +01:00
Clare Macrae
660fb24472 Implemented horizontal rule for dokuwiki (#386) 2013-07-14 15:03:40 +01:00
Clare Macrae
2afa4ec924 Implemented Emphasis (italic) and Strong (bold) for dokuwiki (#386) 2013-07-14 14:58:42 +01:00
Clare Macrae
a43e5983da Implemented correct output of dokuwiki (#386) 2013-07-14 14:24:20 +01:00
Clare Macrae
7eded47bcd Initial work to create dokuwiki writer (#386)
In this first version, all dokuwiki files are straight copies of the
media wiki counterparts.
2013-07-14 13:40:27 +01:00