aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers/RST.hs
AgeCommit message (Collapse)AuthorFilesLines
2020-02-07Apply linter suggestions. Add fix_spacing to lint target in Makefile.John MacFarlane1-1/+1
2019-11-14RST writer: fix backslash escaping after stringsAlbert Krewinkel1-0/+3
The check whether a complex inline element following a string must be escaped, now depends on the last character of the string instead of the first. Fixes: #5906
2019-10-29Changes to build with new doctemplates/doclayout.John MacFarlane1-1/+1
The new version of doctemplates adds many features to pandoc's templating system, while remaining backwards-compatible. New features include partials and filters. Using template filters, one can lay out data in enumerated lists and tables. Templates are now layout-sensitive: so, for example, if a text with soft line breaks is interpolated near the end of a line, the text will break and wrap naturally. This makes the templating system much more suitable for programatically generating markdown or other plain-text files from metadata.
2019-10-03Minor ghc 8.8 fixups.John MacFarlane1-1/+0
2019-07-28Use doctemplates 0.3, change type of writerTemplate.John MacFarlane1-4/+15
* Require recent doctemplates. It is more flexible and supports partials. * Changed type of writerTemplate to Maybe Template instead of Maybe String. * Remove code from the LaTeX, Docbook, and JATS writers that looked in the template for strings to determine whether it is a book or an article, or whether csquotes is used. This was always kludgy and unreliable. To use csquotes for LaTeX, set `csquotes` in your variables or metadata. It is no longer sufficient to put `\usepackage{csquotes}` in your template or header includes. To specify a book style, use the `documentclass` variable or `--top-level-division`. * Change template code to use new API for doctemplates.
2018-08-01RST writer: use `titleblock` instead of `title` variable for title blockFrancesco Occhipinti1-0/+8
Closes #4803 After this commit use `$titleblock$` in order to get what was contained in `$title$` before, that is a title and subtitle rendered according to the official rST method: http://docutils.sourceforge.net/docs/user/rst/quickstart.html#document-title-subtitle. from With this commit, the `$title$` and `$subtitle$` metadata are available and they simply carry the metadata values. This opens up more possibilities in templates.
2018-04-27RST writer: preserve empty inline parents in flatten (#4603)Francesco Occhipinti1-0/+3
2018-04-26RST reader: flatten nested inlines, closes #4368 (#4554)Francesco Occhipinti1-0/+24
nested inlines are not valid RST syntax, so we flatten them following some readability criteria discussed in #4368.
2018-04-19RST writer: use more consistent indentation.John MacFarlane1-9/+9
Previously we used an odd mix of 3- and 4-space indentation. Now we use 3-space indentation, except for ordered lists, where indentation must depend on the width of the list marker. Closes #4563.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-17hlint fixes.John MacFarlane1-1/+1
2018-03-17RST writer: filter out empty inline containers (#4434).Francesco Occhipinti1-7/+11
There is nothing in RST that corresponds to e.g. `Emph []`, so we just filter out elements like this.
2018-03-17RST writer: strip whitespace within inlines, closes #4327 (#4329)Francesco Occhipinti1-0/+9
+ Whitespace is ignored at the beginning and end of emphasis, as per <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup>. + Export `stripLeadingTrailingSpace` from `Text.Pandoc.Writers.Shared`.
2018-01-19in RST writer insert comment between lists and quotes, closes #4248danse1-0/+10
2017-03-14Use tasty for tests rather than test-framework.John MacFarlane1-3/+3
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-3/+3
2017-02-04Moved tests/ -> test/.John MacFarlane1-0/+107