aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/RST.hs
AgeCommit message (Collapse)AuthorFilesLines
2015-01-05ghc 7.10.1 RC1 requires specifying the type of String literals ↵Mark Wright1-3/+3
https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#GHCsaysNoinstanceforFoldable...arisingfromtheuseof...
2014-11-25Reverted "omit blank lines after list items," better fix for #1777.John MacFarlane1-6/+6
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.
2014-11-25RST writer: Omit blank lines after list items.John MacFarlane1-3/+3
They are optional in RST (except after the last list item, of course). Fixes #1777.
2014-11-25RST writer: Ensure blank line after figure.John MacFarlane1-1/+1
2014-11-19Fixed double-rendering of footnotes in RST tables.John MacFarlane1-3/+2
Closes #1769.
2014-09-30RST writer: Wrap line blocks with spaces before continuations.John MacFarlane1-1/+1
Improves on fix to #1656.
2014-09-29Don't wrap lines in rST line blocks.John MacFarlane1-1/+1
Closes #1656. Fixing pandoc to wrap the lines but insert spaces would be much more complicated. This at least makes the output semantically correct.
2014-08-04Use `stripPrefix` where appropriate.Artyom Kazak1-2/+3
2014-07-12Removed space at ends of lines in source.John MacFarlane1-1/+1
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2014-03-14RST writer: Avoid stack overflow with certain tables.John MacFarlane1-2/+6
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.
2014-01-02RST writer: Ensure no blank line after def in definition list.John MacFarlane1-1/+1
Closes #992.
2013-10-16Use isURI instead of isAbsoluteURI.John MacFarlane1-2/+2
It allows fragments identifiers.
2013-10-11RST writer: Skip spaces after display math.John MacFarlane1-2/+8
Otherwise we get indentation problems, and part of the next paragraph may be rendered as part of the math.
2013-08-18Adjusted writers and tests for change in parsing of div/span.John MacFarlane1-1/+5
Textile, MediaWiki, Markdown, Org, RST will emit raw HTML div tags for divs. Otherwise Div and Span are "transparent" block containers.
2013-08-14Updated for removed unMeta, unFormat in pandoc-types.John MacFarlane1-2/+2
2013-08-10Adjustments for new Format newtype.John MacFarlane1-6/+9
2013-08-08Preliminary support for new Div and Span elements in writers.John MacFarlane1-0/+2
Currently these are "transparent" containers, except in HTML, where they produce div and span elements with attributes.
2013-07-01Created Text.Pandoc.Writers.Shared, improved metaToJSON.John MacFarlane1-4/+5
* Text.Pandoc.Writers.Shared contains shared functions used only in writers. * metaToJSON now takes a WriterOptions parameter, and will return an empty object if standalone is not specified.
2013-06-29Metadata changes: Variables now completely shadow metadata.John MacFarlane1-2/+2
Previously if you set a value both in metadata and with a variable, they'd be combined into a list. Now the variable replaces the value in document metadata. If many variables with the same name are set, a list is created. Shared: metaToJSON now has an argument for a variable list.
2013-06-27Writers: Use defField for defaults.John MacFarlane1-6/+6
This way explicitly specified fields not overridden. Fixes a problem e.g. with specifying a documentclass via the command line using -V.
2013-06-24Use new flexible metadata type.John MacFarlane1-25/+37
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-04-14Markdown/RST writers: Only autolink absolute URIs.John MacFarlane1-3/+5
This fixes a regression and closes #830. $ echo '<a href="x">x</a>' | pandoc -f html -t markdown <x>
2013-03-06Support :number-lines: in RST code output.John MacFarlane1-2/+6
2013-01-26RST writer: Use `.. code:: language` for code blocks with language.John MacFarlane1-1/+6
Closes #721. Also fixed whitespace in lhs tests.
2013-01-15Use 'fig:' instead of '\SOH' in title to indicate figure.John MacFarlane1-2/+2
Revises 1a4b47e93368bfbd31daccdfedbd9527ee740201
2013-01-14Implemented Ext_implicit_figures.John MacFarlane1-1/+2
* In markdown reader, add a '\1' character to the beginning of the title of an image that is alone in its paragraph, if implicit_figures extension is selected. * In writers, check for Para [Image alt (src,'\1':tit)] and treat it as a figure if possible. * Updated tests. This is a bit of a hack, but it allows us to make implicit_figures an extension of the markdown reader, rather than the writers.
2013-01-13RST writer: Fixes bug with links with duplicate text.John MacFarlane1-6/+10
We now (a) use anonymous links for links with inline URLs, and (b) use an inline link instead of a reference link if the reference link would require a label that has already been used for a different link. Closes #511.
2013-01-13RST writer: Properly handle images with no alt text.John MacFarlane1-6/+7
Closes #678.
2013-01-13RST writer: Allow soft breaks w continuations in line blocks.John MacFarlane1-1/+1
2013-01-13Use line block in RST writer when a paragraph contains linebreaks.John MacFarlane1-4/+8
Previously linebreaks weren't supported in RST, since RST has no native linebreak construct.
2013-01-09Added Attr field to Header.John MacFarlane1-1/+1
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2013-01-06Don't put the text of an autolink in Code font.John MacFarlane1-2/+5
2013-01-05Changed --toc-level to --toc-depth.John MacFarlane1-1/+1
2013-01-05Implemented --toc-level for rst.John MacFarlane1-1/+3
2012-11-04RST writer: Don't add ":align: center" to figures.John MacFarlane1-2/+1
2012-09-16RST writer: Fixed hyperlinked images.John MacFarlane1-17/+28
* Use :target: field when you have a simple linked image. * Don't wrap the reference. * Cleaned up code. * Closes #611.
2012-08-08Changes to literate haskell options.John MacFarlane1-1/+1
- Removed writerLiterateHaskell from WriterOptions. - Removed readerLiterateHaskell from ReaderOptions. - Added Ext_literate_haskell to Extensions. Test for this instead of the above. - Removed failUnlessLHS from Shared. Note: At this point, +lhs and .lhs extension no longer has any effect. Need to fix.
2012-07-26Moved WriterOptions and associated types Shared -> Options.John MacFarlane1-0/+1
2012-07-26Fixed whitespace errors.John MacFarlane1-24/+24
2012-04-21RST writer: Don't wrap link references.John MacFarlane1-1/+1
Closes #487.
2012-03-24RST writer: Better handling of inline formatting.John MacFarlane1-4/+51
* `hi*there*hi` now gets rendered properly as `hi\ *there*\ hi` * Unnecessary '\ ' are avoided around :math:, :sub:, :sup: * Implemented most of the rules in http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules, though some unnecessary '\ ' may be inserted when unicode quotes are used.
2012-02-08Don't wrap headers in markdown or rst.John MacFarlane1-1/+1
2011-12-31Support for math in RST reader and writer.John MacFarlane1-3/+5
Inline math uses the :math:`...` construct. Display math uses .. math:: ... or if multilin .. math:: ... These seem to be supported now by rst2latex.py.
2011-12-30Support Sphinx-style math in RST writer.John MacFarlane1-2/+3
http://sphinx.pocoo.org/latest/ext/math.html
2011-12-27Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings.John MacFarlane1-4/+0
2011-12-02Shared: Removed unescapeURI, modified escapeURI.John MacFarlane1-5/+3
escapeURI now only escapes space characters, leaving unicode characters as they are, instead of converting them to octets and URL-encoding them, as before. This gives more readable URIs. User agents now do the percent-encoding themselves. URIs are no longer unescaped at all on conversion to markdown, asciidoc, rst, org. Closes #349.
2011-09-05RST writer: Fixed bug involving empty table cells.John MacFarlane1-1/+1
isSimple was being calculated in a way that assumed there were no non-empty cells. Resolves #299. Thanks to rmunoz for reporting the bug.
2011-01-26Add support for attributes in inline Code.John MacFarlane1-3/+3
Additional related changes: * URLs in Code in autolinks now use class "url". * Require highlighting-kate 0.2.8.2, which omits the final <br/> tag, essential for inline code.
2011-01-26Bumped version to 1.8; depend on pandoc-types 1.8.John MacFarlane1-4/+3
The old TeX, HtmlInline and RawHtml elements have been removed and replaced by generic RawInline and RawBlock elements. All modules updated to use the new raw elements.