summaryrefslogtreecommitdiff
path: root/tests/Tests/Writers
Commit message (Collapse)AuthorAge
* Update tests to work with runPure.John MacFarlane2017-01-25
|
* Tests: have docx writer test use runIOorExplode.Jesse Rosenthal2017-01-25
| | | | | Note that part of the reason for making a pure writer is to have better tests, so this is a temporary fix.
* LaTeX writer: Fix unnumbered headers when used with `--top-level`Albert Krewinkel2016-12-04
| | | | | | | | Fix interaction of top-level divisions `part` or `chapter` with unnumbered headers when emitting LaTeX. Headers are ensured to be written using stared commands (like `\subsection*{}`). Fixes: #3272
* 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]
* Refactor top-level division selection (#3261)Albert Krewinkel2016-11-27
| | | | | | | | | | | | | | The "default" option is no longer represented as `Nothing` but via a new type constructor, making the `Maybe` wrapper superfluous. The default behavior of using heuristics can now be enabled explicitly by setting `--top-level-division=default`. API change (`Text.Pandoc.Options`): The `Division` type was renamed to `TopLevelDivision`. The `Section`, `Chapter`, and `Part` constructors were renamed to `TopLevelSection`, `TopLevelChapter`, and `TopLevelPart`, respectively. An additional `TopLevelDefault` constructor was added, which is now also the new default value of the `writerTopLevelDivision` field in `WriterOptions`.
* Allow to overwrite top-level division type heuristics (#3258)Albert Krewinkel2016-11-26
| | | | | | | | | | | | | Pandoc uses heuristics to determine the most resonable top-level division type when emitting LaTeX or Docbook markup. It is now possible to overwrite this implicitly set top-level division via the `top-level-division` command line parameter. API change (`Text.Pandoc.Options`): the type of the `writerTopLevelDivision` field in of the `WriterOptions` data type is altered from `Division` to `Maybe Division`. The field's default value is changed from `Section` to `Nothing`. Closes: #3197
* Add option for top-level division typeAlbert Krewinkel2016-10-19
| | | | | | | | | | The `--chapters` option is replaced with `--top-level-division` which allows users to specify the type as which top-level headers should be output. Possible values are `section` (the default), `chapter`, or `part`. The formats LaTeX, ConTeXt, and Docbook allow `part` as top-level division, TEI only allows to set the `type` attribute on `div` containers. The writers are altered to respect this option in a sensible way.
* Remove Tests.ArbitraryJesse Rosenthal2016-10-14
| | | | Use exported Arbitrary instances from pandoc-types instead.
* Markdown writer: add test for note placement.Jesse Rosenthal2016-10-11
|
* LaTeX writer: change braced backtick to \textasciigrave{}Jesse Rosenthal2016-09-20
| | | | | | | Backticks in verbatim environments are converted to open-single-quotes. This change makes them appear as backticks. This corresponds to how we treat `'' in verbatim environments (with \textquotesingle{}).
* Add test for backtick in verbatim.Jesse Rosenthal2016-09-19
|
* Docx writer test: comment out function to make compiler happy.Jesse Rosenthal2016-08-15
|
* Docx writer: test for custom styles.Jesse Rosenthal2016-08-15
| | | | | | | | This just tests whether a custom style with a recognizable style (italic etc, defined in a reference.docx) will roundtrip back to that format (i.e., whether `<span custom-style="Emphasized">` will roundtrip to `Emph`). The custom styles are defined in the `custom-style-reference.docx` included in the docx dir.
* Docx writer tests: allow for altered round tripJesse Rosenthal2016-08-15
| | | | | | Sometimes we will want to get back something different than we started with in a round-trip test. This allows for that, and makes the perfect roundtrip a special case.
* Removed some redundant class constraints.John MacFarlane2016-07-14
|
* Added some entity tests in Markdown reader tests.John MacFarlane2016-01-19
| | | | | | | | | | | | | Change types of divs. From Docbook "sect#" and "simplesect" to "level#" and "section." Add tests. Add mention of TEI to README. Small changes to TEI writer.
* Add TEI Writer.csforste2016-01-19
|
* 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.
* | 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.
* | LaTeX writer: add `\protect` to `\hyperlink`.John MacFarlane2015-10-28
| | | | | | | | | | | | Thanks to Hadrien Mary for the problem and solution. Closes #2490.
* | LaTeX writer: Use `\hypertarget` and `\hyperlink` for links.John MacFarlane2015-10-27
| | | | | | | | | | | | | | | | This works correctly to link to Div or Span elements. We now don't bother defining `\label` for Div or Span elements. Closes jgm/pandoc-citeproc#174.
* | 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.
* | [RST Writer] Don't normalize heading levels below input minimumNikolay Yakimov2015-09-19
| |
* | Tests: docx writer tests now use "../data" for data directory.John MacFarlane2015-09-09
|/ | | | This allows tests to be run without installing first.
* Markdown writer: improved escaping.John MacFarlane2015-04-18
| | | | | | | | `<` should not be escaped as `\<`, for compatibility with original Markdown. We now escape `<` and `>` with entities. Also, we now backslash-escape square brackets. Closes #2086.
* Merge branch 'latex-tightlist' of https://github.com/jlduran/pandoc into ↵John MacFarlane2015-04-17
|\ | | | | | | | | | | | | jlduran-latex-tightlist Conflicts: data/templates
| * LaTeX writer: Use a declaration for tight listsJose Luis Duran2014-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, pandoc has hard-coded the following in order to make tight lists in LaTeX: ```hs text "\\itemsep1pt\\parskip0pt\\parsep0pt" ``` Which is fine, but does not allow customizations. For example, the `memoir` class already has a `\tightlist` declaration for this purpose: ```tex \newcommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} ``` I'm proposing to use a similar solution: ```diff @@ In Writers/LaTeX.hs: -then text "\\itemsep1pt\\parskip0pt\\parsep0pt" +then text "\\tightlist" @@ In templates/default.latex: +\newcommand{\tightlist}{% + \setlength{\itemsep}{1pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}} ``` This allows us to customize the tightness to our needs. Backward Compatibility If a person is using a custom LaTeX template (not based upon the `memoir` class), the `\tightlist` declaration must be added.
* | RST Writer: Tests for rubrics and heading normalizationNikolay Yakimov2015-04-16
| |
* | Merge branch 'errortype' of https://github.com/mpickering/pandoc into ↵John MacFarlane2015-03-28
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mpickering-errortype Conflicts: benchmark/benchmark-pandoc.hs src/Text/Pandoc/Readers/Markdown.hs src/Text/Pandoc/Readers/Org.hs src/Text/Pandoc/Readers/RST.hs tests/Tests/Readers/LaTeX.hs
* \ \ Merge pull request #1968 from lierdakil/issue1607John MacFarlane2015-03-16
|\ \ \ | | | | | | | | Fixes for multiple docx writer style bugs.
| * | | Docx Writer: Tables testNikolay Yakimov2015-03-08
| | | |
| * | | Lists testNikolay Yakimov2015-03-08
| | | |
| * | | Initial tests for writerNikolay Yakimov2015-03-03
| |/ /
* / / Support shortcut reference links in markdown writerKonstantin Zudov2015-03-10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #1977 Most markdown processors support the [shortcut format] for reference links. Pandoc's markdown reader parsed this shortcuts unoptionally. Pandoc's markdown writer (with --reference-links option) never shortcutted links. This commit adds an extension `shortcut_reference_links`. The extension is enabled by default for those markdown flavors that support reading shortcut reference links, namely: - pandoc - strict pandoc - github flavoured - PHPmarkdown If extension is enabled, reader parses the shortcuts in the same way as it preveously did. Otherwise it would parse them as normal text. If extension is enabled, writer outputs shortcut reference links unless doing so would cause problems (see test cases in `tests/Tests/Writers/Markdown.hs`).
* | Improved texorpdfstring patch #1148.John MacFarlane2014-12-15
| | | | | | | | | | | | * Make LaTeX reader recognize texorpdfstring. * Don't use texorpdfstring unless it's actually needed. * Fix tests.
* | Merge branch 'use-texorpdfstring' of https://github.com/wilx/pandoc into ↵John MacFarlane2014-12-15
|\ \ | | | | | | | | | | | | | | | | | | | | | wilx-use-texorpdfstring Conflicts: src/Text/Pandoc/Writers/LaTeX.hs tests/Tests/Writers/LaTeX.hs
| * | Update tests suite to expect \texorpdfstring.Vaclav Zeman2014-02-13
| | |
* | | LaTeX writer: Test for protecting images in header.Jesse Rosenthal2014-09-09
| |/ |/|
* | LaTeX writer: Add tests for header-in-item.Jesse Rosenthal2014-08-31
| |
* | Correctly implement capitalisation.Artyom Kazak2014-08-03
| | | | | | | | | | | | | | | | Using `map toUpper` to capitalise text is wrong, as e.g. “Straße” should be converted to “STRASSE”, which is 1 character longer. This commit adds a `capitalize` function and replaces 2 identical implementations in different modules (`toCaps` and `capitalize`) with it.
* | LaTeX writer: use \(..\) instead of $..$ for inline math.John MacFarlane2014-07-29
| | | | | | | | Closes #1464.
* | AsciiDoc writer: Double markers in intraword emphasis.John MacFarlane2014-07-20
| | | | | | | | Closes #1441.
* | LaTeX writer: Use `\textquotesingle` for `'` in inline code.John MacFarlane2014-06-23
| | | | | | | | | | Otherwise we get curly quotes in the PDF output. Closes #1364.
* | LaTeX writer: Fixed strikeout + highlighted code. Closes #1294.John MacFarlane2014-06-20
| | | | | | | | Previously strikeout highlighted code caused an error.
* | Added Tests.Writer.AsciiDoc to repository.John MacFarlane2014-05-03
| |
* | Distinguish tight and loose lists in Docbook outputNeil Mayhew2014-05-03
| | | | | | | | Determined by the first block of the first item being Plain.
* | Add some unit tests for Writers.DocbookNeil Mayhew2014-04-12
|/ | | | | | | | These are primarily aimed at testing the new treatment of line breaks, but hopefully other tests can be added more easily now as features and changes are implemented in the writer. Adapted from Tests.Writers.HTML.tests.