aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2017-10-31FB2 writer: make bullet lists consistent with ordered listsAlexander Krotov1-10/+10
Previously bullet lists interacted in odd way with ordered lists. For example, bullet lists nested in ordered list had incorrect indentation. Besides that, indentation with spaces is not rendered by FBReader and fbless. To avoid this problem, bullet lists are indented by appending bullets to marker just the same way it is done for ordered lists.
2017-10-30Added failing command test for #4007.John MacFarlane1-0/+23
2017-10-29Export all of Text.Pandoc.Class from Text.Pandoc.John MacFarlane2-2/+0
2017-10-29Write FB2 lists without nesting blocks inside <p> (#4004)Alexander2-83/+87
According to FB2 XML schema <empty-line /> cannot be placed inside <p>. Linux FBReader can't display such paragraphs, e.g. any "loose" lists produced by pandoc prior to this commit. Besides that, FB2 writer placed <p> inside <p> when writing nested lists, this commit fixes the bug. Also this commit removes leading non-breaking space from ordered lists for consistency with bullet lists. Definition lists are not affected at all.
2017-10-29Creole reader (#4002)Sascha Wilde3-0/+236
* Basic skeleton for creole reader. No real functionality besides preliminary bold and italics yet. * Creole: add support for bold/italic with implicit end at paragraph end. * Creole: add support for headings. * Creole: add support for tilde escaped chars. * Basic skeleton for creole reader. No real functionality besides preliminary bold and italics yet. * Creole: add support for bold/italic with implicit end at paragraph end. * Creole: add support for headings. * Creole: add support for tilde escaped chars. * Add a test suite for the creole parser So far this covers only things the parser already supports. * Added simple parsing of flat unordered lists. * Added tests for unordered lists in creole. * First, wrong(!) implementation of sublists. Fails test, as sublists should not be embedded in a list item! * Implementation of unordered sublists. * Added support for ordered lists to creole reader. * Added utility function to append parsers to Creole reader. * Creole reader: Fixed list item end detection in sub lists. * Tests for creole reader: added more tests for lists. Covering ordered and unordered tests, even mixed. Tests for formatting in list items still missing... * Added "nowiki" blocks. One exception rule is missing... * Creole reader: nowiki: implemented exception for curly brackets. * Creole reader: added inline nowiki. * Creole reader: added horizontalRule. * Creole reader: added auto linking of URIs. * Creole reader: detect horizontalRule as para end. Used the opportunity for a little refactoring. * Creole reader: added forced line breaks. Including test. * Creole reader: implement wiki links. * Creole reader: added image support. * Creole reader: support images as links. * Creole reader: implemented placeholder -- by simply dropping them. * Creole reader: added tests for links. After observing a regression, it was really time... ;-) * Creole reader: fixed links with names. * Creole reader: allow space after first of enclosing tags. Space after the start of formatting tags are allowed with creole, e.g. "there is // italic text // in here" is legal. This problem was discovered using the creole1.0test.txt document from http://www.wikicreole.org/wiki/Creole1.0TestCases See l.57: # // italic item 3 // * Creole reader: fixed links without names. * Creole reader: Tests, sorted into groups. * Creole reader: implemented tables. * Removed redundant import. * Creole reader: add correct escaping of links. * Creole reader: allow handling of e.g. links in parenthesis and quotes. * Creole reader: Modified disclaimer as most of the code is actually by me. * Creole reader: Tests: added escaped links. * Creole reader: preserve leading and trailing space in bold/italic. * Creole reader: detect tables without a leading blank line. * Creole Reader: added official creole1.0test.txt as "old" test. The base document was downloaded from http://www.wikicreole.org/wiki/Creole1.0TestCases. The Wiki, and therefore the test document is Copyright (C) by the contributors. Some rights reserved, license CC BY-SA. http://creativecommons.org/licenses/by-sa/1.0/
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane10-31/+31
2017-10-27Removed old adjacent_links test for docx reader.John MacFarlane3-5/+0
See #2270 for background -- this test blocked the consistent underline change and was hard to revise, so for now we are removing it.
2017-10-27Consistent underline for Readers (#2270)hftf8-6/+17
* Added underlineSpan builder function. This can be easily updated if needed. The purpose is for Readers to transform underlines consistently. * Docx Reader: Use underlineSpan and update test * Org Reader: Use underlineSpan and add test * Textile Reader: Use underlineSpan and add test case * Txt2Tags Reader: Use underlineSpan and update test * HTML Reader: Use underlineSpan and add test case
2017-10-26Creole reader (#3994)Sascha Wilde2-0/+275
This is feature complete but not very thoroughly tested yet.
2017-10-26Use skylighting 0.4.2.John MacFarlane2-12/+10
This prevents the problem with extra space around highlighted code blocks (closes #3996). Note that we no longer put an enclosing div around highlighted code blocks. The pre is the outer element, just as for unhighlighted blocks.
2017-10-24Fenced divs: ensure that paragraph at end doesn't become Plain.John MacFarlane1-1/+14
Added test case.
2017-10-23Back to using [WARNING] and [INFO] to mark messages.John MacFarlane3-5/+5
2017-10-23Implemented fenced Divs.John MacFarlane1-0/+30
+ Added Ext_fenced_divs to Extensions (default for pandoc Markdown). + Document fenced_divs extension in manual. + Implemented fenced code divs in Markdown reader. + Added test. Closes #168.
2017-10-23HTML reader: `htmlTag` improvements.John MacFarlane1-0/+9
We previously failed on cases where an attribute contained a `>` character. This patch fixes the bug. Closes #3989.
2017-10-23More pleasing presentation of warnings and info messages.John MacFarlane3-5/+5
!! warning -- info
2017-10-23Fixed test for change in log level.John MacFarlane1-3/+0
2017-10-22LaTeX Reader: support \lettrinemb211-0/+9
2017-10-19LaTeX reader: support `\expandafter`.John MacFarlane1-0/+29
Closes #3983.
2017-10-17Latex reader: Skip spaces in image optionsBen Firshman1-0/+3
2017-10-17Add tests for existing \includegraphics behaviourBen Firshman1-0/+24
2017-10-16Revised command test 3971 to work with Windows.John MacFarlane1-2/+2
2017-10-16Improved handling of include files in LaTeX reader.John MacFarlane2-0/+11
Previously `\include` wouldn't work if the included file contained, e.g., a begin without a matching end. We've changed the Tok type so that it stores a full SourcePos, rather than just a line and column. So tokens keeep track of the file they came from. This allows us to use a simpler method for includes, which doesn't require parsing the included document as a whole. Closes #3971.
2017-10-16RST writer: correctly handle inline code containing backticks.John MacFarlane1-0/+6
(Use a :literal: role.) Closes #3974.
2017-10-16RST writer: don't backslash-escape word-internal punctuation.John MacFarlane2-1/+7
Closes #3978.
2017-10-11ConTeXt writer: Use identifiers for chapters.John MacFarlane1-0/+9
Closes #3968.
2017-10-08Add test - closes #3958.John MacFarlane1-0/+20
2017-10-08Org reader: end footnotes after two blank linesAlbert Krewinkel1-59/+74
Footnotes can not only be terminated by the start of a new footnote or a header, but also by two consecutive blank lines.
2017-10-06LaTeX reader: read polyglossia/babel \text($LANG){...}.bucklereed1-0/+20
2017-10-02Removed spuriously added test/pandoc.tix.John MacFarlane1-1/+0
2017-10-02Markdown reader: Fixed bug with indented code following raw LaTeX.John MacFarlane1-0/+11
Closes #3947.
2017-10-02Org reader: support `\n` export optionAlbert Krewinkel1-0/+7
The `\n` export option turns all newlines in the text into hard linebreaks. Closes #3950
2017-09-30Removed writerSourceURL, add source URL to common state.John MacFarlane3-8/+5
Removed `writerSourceURL` from `WriterOptions` (API change). Added `stSourceURL` to `CommonState`. It is set automatically by `setInputFiles`. Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`. The type of `getInputFiles` has changed; it now returns `[FilePath]` instead of `Maybe [FilePath]`. Functions in Class that formerly took the source URL as a parameter now have one fewer parameter (`fetchItem`, `downloadOrRead`, `setMediaResource`, `fillMediaBag`). Removed `WriterOptions` parameter from `makeSelfContained` in `SelfContained`.
2017-09-30Text.Pandoc.Lua: add mediabag submoduleAlbert Krewinkel1-3/+7
2017-09-28Muse reader: parse anchorsAlexander Krotov1-0/+20
2017-09-27RST writer: add header anchors when header has non-standard id.John MacFarlane1-0/+13
Closes #3937.
2017-09-26Muse reader: test metadata parsingAlexander Krotov1-0/+7
2017-09-25Org reader: update emphasis border charsAlbert Krewinkel1-9/+9
The org reader was updated to match current org-mode behavior: the set of characters which are acceptable to occur as the first or last character in an org emphasis have been changed and now allows all non-whitespace chars at the inner border of emphasized text (see `org-emphasis-regexp-components`). Fixes: #3933
2017-09-24Allow lua filters to return lists of elementsAlbert Krewinkel1-0/+3
Closes: #3918
2017-09-17Added `--strip-comments` option, `readerStripComments` in `ReaderOptions`.John MacFarlane1-0/+14
* Options: Added readerStripComments to ReaderOptions. * Added `--strip-comments` command-line option. * Made `htmlTag` from the HTML reader sensitive to this feature. This affects Markdown and Textile input. Closes #2552.
2017-09-12Textile reader: allow 'pre' code in list item.John MacFarlane1-0/+11
Closes #3916.
2017-09-11Merge pull request #3911 from labdsf/muse-reader-bracesJohn MacFarlane1-0/+33
Muse reader: parse {{{ }}} example syntax
2017-09-11Muse reader: allow inline markup to be followed by punctuationAlexander Krotov1-2/+18
Previously code was not allowed to be followed by comma, and emphasis was allowed to be followed by letter.
2017-09-11Muse reader: parse {{{ }}} example syntaxAlexander Krotov1-0/+33
2017-09-11Muse reader: parse verbatim tagAlexander Krotov1-0/+2
2017-09-10Muse reader: trim newlines from <example>sAlexander Krotov1-0/+25
2017-09-09Updated lhs-test for new skylighting.John MacFarlane2-74/+108
2017-09-09Muse reader: debug inline code markupAlexander Krotov1-2/+32
2017-09-08Adjusted some tests for last commit.John MacFarlane2-0/+2
2017-09-08Write euro symbol directly in LaTeXAndrew Dunning2-0/+2
The textcomp package allows pdfLaTeX to parse `€` directly, making the \euro command unneeded. Closes #3801.
2017-09-07LaTeX template: load polyglossia after header-includes.John MacFarlane1-6/+6
It needs to be loaded as late as possible. Closes #3898.