summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/RST.hs
Commit message (Collapse)AuthorAge
* Update dates in copyright noticesAlbert Krewinkel2017-05-13
| | | | | This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
* RST writer: improve grid table output, fix bug with empty rows.John MacFarlane2017-03-21
| | | | | | | Uses the new gridTable in Writers.Shared, which is here improved to better handle 0-width cells. Closes #3516.
* RST writer: convert to PandocMonad, report on unrendered raw items.John MacFarlane2017-03-13
|
* Removed normalizeSpaces from Text.Pandoc.Shared.John MacFarlane2017-03-10
| | | | | | | Rewrote functions in RST reader and writer to avoid the need for it. Closes #1530.
* Remove space at beginning/end of RST code span.John MacFarlane2017-03-08
| | | | | | | Otherwise we get invalid RST. There seems to be no way to escape the space. Closes #3496.
* Stylish-haskell automatic formatting changes.John MacFarlane2017-03-04
|
* Writers: Use gets to access MonadState where possible (#3480)Alexander Krotov2017-03-01
|
* RST reader/writer: properly handle table captions.John MacFarlane2017-02-11
| | | | | | Currently the support for the `.. table` directive is a bit limited; we don't yet support the `widths` field. But at least you can have a proper captioned table.
* Improved escaping in RST writer with smart option.John MacFarlane2017-02-04
|
* Implemented +/-smart in rst writer.John MacFarlane2017-02-04
| | | | Moved unsmartify to Writers.Shared.
* Revert "Added page breaks into Pandoc."John MacFarlane2017-01-25
| | | | This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
* Convert all writers to use PandocMonad.Jesse Rosenthal2017-01-25
| | | | | | | | | | | | | | | 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.
* Adds support for pagebreaks (when it makes sense)Hubert Plociniczak2017-01-25
| | | | | | | 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.
* Options: Removed writerStandalone, made writerTemplate a Maybe.John MacFarlane2016-11-30
| | | | | | | | 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]
* Fixed some bugs in Pretty that caused blank lines in tables.John MacFarlane2016-11-23
| | | | | | | | | The bugs caused spurious blank lines in grid tables when we had things like blankline $$ blankline Closes #3251.
* Add support for the LineBlock element to writersAlbert Krewinkel2016-10-13
| | | | | | | | | | | | | | | | | 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.
* RST, Markdown writers: Fixed rendering of grid tables with blank rows.John MacFarlane2016-01-05
| | | | Closes #2615.
* Implemented SoftBreak and new `--wrap` option.John MacFarlane2015-12-11
| | | | | | | | | | | | | | | | 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.
* Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane2015-11-19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Updated readers, writers and README for link attributemb212015-08-07
| |
| * Updated readers and writers for new image attribute parameter.John MacFarlane2015-08-07
| | | | | | | | (mb21)
* | Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane2015-11-09
| | | | | | | | This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
* | Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane2015-11-08
| | | | | | | | | | | | | | This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
* | Use custom Prelude to avoid compiler warnings.John MacFarlane2015-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | RST writer: do header normalization only in "standalone" mode.John MacFarlane2015-10-12
| | | | | | | | | | | | | | | | | | | | | | If we're producing a fragment, just skip normalization. After all, the fragment might be somewhere in the middle of the document. It's more important for fragments to have consistency in rendering (so they can be pieced together) than to normalize. This closes #2394. It's simpler and more robust than my earlier fix.
* | Revert "RST writer: tweaks to header normalization."John MacFarlane2015-10-12
| | | | | | | | This reverts commit 476b383c578699567ac4630391a15855521ab3d4.
* | RST writer: tweaks to header normalization.John MacFarlane2015-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes are intended to make the writer more useful to people who are processing small fragments, which may for example look like this: ### third level header from previous section ## second level header Previously such fragments got turned into two headers of the same level. The new algorithm avoids doing any normalization until we hit the minimal-level header in the fragment (here, the second level header). Closes #2394.
* | [RST Writer] Don't normalize heading levels below input minimumNikolay Yakimov2015-09-19
| |
* | RST writer: ensure that `\ ` is inserted when needed...John MacFarlane2015-08-13
| | | | | | | | | | ...before Cite and Span elements that begin with a "complex" element. Closes jgm/pandoc-citeproc#157.
* | RST writer: Don't insert `\ ` when complex expression in matched pairs.John MacFarlane2015-08-12
|/ | | | E.g. `` [:sup:`3`] `` is okay; you don't need `` [:sup:`3`\ ] ``.
* Updated copyright notices to -2015. Closes #2111.John MacFarlane2015-04-26
|
* RST Writer: treat headings in block quotes, etc as rubricsNikolay Yakimov2015-04-16
|
* RST Writer: Normalize headings to sequential levelsNikolay Yakimov2015-04-13
| | | | This is pretty much required by docutils.
* Fixed toc depth in RST writer.John MacFarlane2015-04-12
| | | | | | Previously the depth was being rendered as a floating point number with a decimal point. Thanks to Nick Yakimov for noticing this.
* RST writer: better handling of raw latex inline.John MacFarlane2015-04-07
| | | | | | | We use `` :raw-latex:`...` `` and add a definition for this role to the template. Closes #1961.
* ghc 7.10.1 RC1 requires specifying the type of String literals ↵Mark Wright2015-01-05
| | | | https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#GHCsaysNoinstanceforFoldable...arisingfromtheuseof...
* Reverted "omit blank lines after list items," better fix for #1777.John MacFarlane2014-11-25
| | | | | | | Now we do as before, including blank lines after list items in loose lists (even though RST doesn't care -- this is just a matter of visual appeal). But we chomp any excess whitespace after the last list item, which solves #1777.
* RST writer: Omit blank lines after list items.John MacFarlane2014-11-25
| | | | | | | They are optional in RST (except after the last list item, of course). Fixes #1777.
* RST writer: Ensure blank line after figure.John MacFarlane2014-11-25
|
* Fixed double-rendering of footnotes in RST tables.John MacFarlane2014-11-19
| | | | Closes #1769.
* RST writer: Wrap line blocks with spaces before continuations.John MacFarlane2014-09-30
| | | | Improves on fix to #1656.
* Don't wrap lines in rST line blocks.John MacFarlane2014-09-29
| | | | | | | | Closes #1656. Fixing pandoc to wrap the lines but insert spaces would be much more complicated. This at least makes the output semantically correct.
* Use `stripPrefix` where appropriate.Artyom Kazak2014-08-04
|
* Removed space at ends of lines in source.John MacFarlane2014-07-12
|
* Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
|
* RST writer: Avoid stack overflow with certain tables.John MacFarlane2014-03-14
| | | | | | | | | Closes #1197. Note that there are still problems with the formatting of the tables inside tables with output produced from the input file in the original bug report. But this fixes the stack overflow problem.
* RST writer: Ensure no blank line after def in definition list.John MacFarlane2014-01-02
| | | | Closes #992.
* Use isURI instead of isAbsoluteURI.John MacFarlane2013-10-16
| | | | It allows fragments identifiers.
* RST writer: Skip spaces after display math.John MacFarlane2013-10-11
| | | | | Otherwise we get indentation problems, and part of the next paragraph may be rendered as part of the math.
* Adjusted writers and tests for change in parsing of div/span.John MacFarlane2013-08-18
| | | | | Textile, MediaWiki, Markdown, Org, RST will emit raw HTML div tags for divs. Otherwise Div and Span are "transparent" block containers.