aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2015-12-12Modified readers to emit SoftBreak when appropriate.John MacFarlane6-6/+6
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane19-83/+86
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-03LaTeX template changes:John MacFarlane4-8/+0
- only pass options to color package if colorlinks is set - make definition of `\euro` conditional in xelatex/lualatex, as it is already for pdflatex (Andrew Dunning)
2015-12-03Fixed man template so disabling hyphenation actually works.John MacFarlane1-1/+1
The command needs to come after .TH.
2015-11-24Added bodyless pipe table test case.John MacFarlane2-1/+11
See #2556.
2015-11-23LaTeX reader: Use curly quotes for unmatched `.John MacFarlane1-1/+1
Partially addresses #2555. Note that there's still a problem with the code sample given.
2015-11-23AsciiDoc writer: Fixed code blocks.John MacFarlane1-20/+20
Closes #1861.
2015-11-20Updated tests for context template changes.John MacFarlane2-23/+18
2015-11-20latex template changes.John MacFarlane4-21/+17
* Removed setting of `subject` in PDF metadata. This used to be set to the subtitle, but really the subtitle need not give the subject. Also, `subtitle` can contain formatting, so we'd need, at least, a plain text version for this. * Moved `header-includes` before setting of `\title`, `\author`, etc. This allows these macros to be redefined. * Use `\subtitle` command for `subtitle`, instead of tacking it on to the title as before. We give a no-op fallback definition if it is not defined. This change should produce much better results in classes that support `\subtitle`. With the default article class, which does not define `\subtitle`, subtitles will no longer be printed unless the user defines `\subtitle` and redefines `\maketitle`. * Moved redefinitions of `\paragraph` and `\subparagraph` to before header-includes.
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane38-392/+362
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.
2015-11-18Docx reader: Add test cases for dummy list items.Jesse Rosenthal5-0/+14
2015-11-16ICML writer: better handling of math.John MacFarlane1-9/+59
Instead of just printing the raw tex, we now try to fake it with unicode characters.
2015-11-14Added test case for links in notes.Jesse Rosenthal3-0/+5
2015-11-13Merge pull request #2526 from tarleb/org-definition-lists-fixJohn MacFarlane1-1/+5
Org reader: Require whitespace around def list markers
2015-11-13Org reader: Require whitespace around def list markersAlbert Krewinkel1-1/+5
Definition list markers (i.e. double colons `::`) must be surrounded by whitespace to start a definition item. This rule was not checked before, resulting in bugs with footnotes and some link types. Thanks to @conklech for noticing and reporting this issue. This fixes #2518.
2015-11-13Merge pull request #2525 from tarleb/org-smart-fixesJohn MacFarlane1-0/+9
Org reader: Fix emphasis rules for smart parsing
2015-11-13Added `emoji` extension to Markdown.John MacFarlane1-0/+4
This is enabled by default in `markdown_github`. Added `Ext_emoji` to `Extension` in `Text.Pandoc.Options` (API change). Closes #2523.
2015-11-13Org reader: Fix emphasis rules for smart parsingAlbert Krewinkel1-0/+9
Smart quotes, ellipses, and dashes should behave like normal quotes, single dashes, and dots with respect to text markup parsing. The parser state was not updated properly in all cases, which has been fixed. Thanks to @conklech for reporting this issue. This fixes #2513.
2015-11-12Updated tests for template changes.John MacFarlane6-34/+28
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane25-26/+1
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Merge pull request #2505 from tarleb/org-header-markup-fixJohn MacFarlane1-0/+11
Org reader: fix markup parsing in headers
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane25-1/+26
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-11-08Org reader: fix markup parsing in headersAlbert Krewinkel1-0/+11
Markup as the very first item in a header wasn't recognized. This was caused by an incorrect parser state: positions at which inline markup can start need to be marked explicitly by changing the parser state. This wasn't done for headers. The proper function to update the state is now called at the beginning of the header parser, fixing this issue. This fixes #2504.
2015-10-30Pipe tables with long lines now get relative cell widths.John MacFarlane2-1/+19
If a pipe table contains a line longer than the column width (as set by `--columns` or 80 by default), relative widths are computed based on the widths of the separator lines relative to the column width. This should solve persistent problems with long pipe tables in LaTeX/PDF output, and give more flexibility for determining relative column widths in other formats, too. For narrower pipe tables, column widths of 0 are used, telling pandoc not to specify widths explicitly in output formats that permit this. Closes #2471.
2015-10-30HTML writer: use width on whole table if col widths sum to < 100%.John MacFarlane1-3/+3
Otherwise some browsers display the table with the columns separated far apart.
2015-10-30Textile reader: don't do smart punctuation unless explicitly asked.John MacFarlane1-8/+8
Closes #2480. Note that although smart punctuation is part of the textile spec, it's not always wanted when converting from textile to, say, Markdown. So it seems better to make this an option.
2015-10-28LaTeX writer: add `\protect` to `\hyperlink`.John MacFarlane1-1/+1
Thanks to Hadrien Mary for the problem and solution. Closes #2490.
2015-10-27LaTeX writer: Use `\hypertarget` and `\hyperlink` for links.John MacFarlane1-1/+1
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.
2015-10-25Template improvements (Andrew Dunning).John MacFarlane3-9/+12
- Added `keywords` to HTML templates and fixed alignment. - Updated dzslides template from source. - Added `lang`, `dir`, `quotes` to HTML templates; always make author and date display conditional. - Fixed `author` and `date` in asciidoc; added `keywords`, `abstract`. - Updated tests.
2015-10-25Merge pull request #2477 from tarleb/org-toggling-header-argsJohn MacFarlane1-0/+19
Org reader: allow toggling header args
2015-10-25Org reader: allow toggling header argsAlbert Krewinkel1-0/+19
Org-mode allows to skip the argument of a code block header argument if it's toggling a value. Argument-less headers are now recognized, avoiding weird parsing errors. The fixes are not exactly pretty, but neither is the code that was fixed. So I guess it's about par for the course. However, a rewrite of the header parsing code wouldn't hurt in the long run. Thanks to @jo-tham for filing the bug report. This fixes #2269.
2015-10-24Org reader: fix paragraph/list interactionAlbert Krewinkel1-0/+8
Paragraphs can be followed by lists, even if there is no blank line between the two blocks. However, this should only be true if the paragraph is not within a list, were the preceding block should be parsed as a plain instead of paragraph (to allow for compact lists). Thanks to @rgaiacs for bringing this up. This fixes #2464.
2015-10-22Fixed over-eager raw HTML inline parsing.John MacFarlane1-0/+3
Tightened up the inline HTML parser so it disallows TagWarnings. This only affects the markdown reader when the `markdown_in_html_blocks` option is disabled. Closes #2469.
2015-10-20Updated tests for latex/context template changes.John MacFarlane6-161/+87
2015-10-19Fixed one test case.John MacFarlane1-1/+1
2015-10-19Merge pull request #2458 from mb21/lang-inlinesJohn MacFarlane5-0/+309
LaTeX and ConTeXt writers: support lang attribute on divs and spans
2015-10-18Updated tests for template changes.John MacFarlane3-3/+3
2015-10-18Tests: Unset `pandoc-version` so we don't get the comment...John MacFarlane2-3/+2
in the man writer test. Otherwise this needs updating every version bump.
2015-10-18Added writers-lang-and-dir test, fixed ConTeXt writer testmb215-0/+309
The writers-lang-and-dir testGroup tests LaTeX and ConTeXt writers' language and directionality output
2015-10-15Use unicode super/subscripts for digits in plain output.John MacFarlane1-2/+2
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane8-8/+0
- 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.
2015-10-13Fixed tests for template changes.John MacFarlane3-5/+7
2015-10-12RST writer: do header normalization only in "standalone" mode.John MacFarlane1-8/+13
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.
2015-10-11Percent-encode more special characters in URLs.John MacFarlane1-2/+4
HTML, LaTeX writers adjusted. The special characters are '<','>','|','"','{','}','[',']','^', '`'. Closes #1640, #2377.
2015-10-11HTML reader/writer: better handling of "section" elements.John MacFarlane5-559/+1451
Previously `<section>` tags were just parsed as raw HTML blocks. With this change, section elements are parsed as Div elements with the class "section". The HTML writer will use `<section>` tags to render these Divs in HTML5; otherwise they will be rendered as `<div class="section">`. Closes #2438.
2015-10-10Removed xltxtra, xunicode from LaTeX template.John MacFarlane3-3/+0
Thanks Andrew Dunning. Updated tests and changelog.
2015-10-10Merge pull request #2412 from frerich/reader/docbook/xref_supportJohn MacFarlane3-0/+101
Added support for <xref> tag in DocBook reader
2015-10-10Adjusted man writer test for latest template changes.John MacFarlane1-0/+3
2015-10-04Merge pull request #2432 from hftf/hyphensJohn MacFarlane3-0/+6
Docx Reader: Parse soft and non-breaking hyphen elements
2015-10-04Updated tests for changes to latex template.John MacFarlane3-3/+27