aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Readers/Markdown.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-01-25Made `smart` extension default for pandoc markdown.John MacFarlane1-5/+7
Updated tests.
2017-01-25Removed readerSmart and the --smart option; added Ext_smart extension.John MacFarlane1-1/+2
Now you will need to do -f markdown+smart instead of -f markdown --smart This change opens the way for writers, in addition to readers, to be sensitive to +smart, but this change hasn't yet been made. API change. Command-line option change. Updated manual.
2017-01-25Make Extensions a custom type instead of a Set Extension.John MacFarlane1-4/+3
The type is implemented in terms of an underlying bitset which should be more efficient. API change: from Text.Pandoc.Extensions export Extensions, emptyExtensions, extensionsFromList, enableExtension, disableExtension, extensionEnabled.
2017-01-25Update all tests to use new readers and error structure.Jesse Rosenthal1-6/+6
2016-12-24markdown reader: disallow space between inline code and attributes (#3326)Mauro Bieg1-1/+2
closes #3323
2016-10-26Markdown Reader: add attributes for autolink (#3183)Daniele D'Orazio1-1/+10
2016-10-24Export Text.Pandoc.Error in Text.Pandoc.John MacFarlane1-2/+0
[API change]
2016-10-23Tighten up parsing of raw email addresses.John MacFarlane1-0/+5
Technically `**@user` is a valid email address, but if we allow things like this, we get bad results in markdown flavors that autolink raw email addresses. (See #2940.) So we exclude a few valid email addresses in order to avoid these more common bad cases. Closes #2940.
2016-10-14Remove Tests.ArbitraryJesse Rosenthal1-1/+1
Use exported Arbitrary instances from pandoc-types instead.
2016-01-08Added some entity tests in Markdown reader tests.John MacFarlane1-0/+9
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane1-3/+5
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-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-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane1-0/+1
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
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-11Percent-encode more special characters in URLs.John MacFarlane1-2/+4
HTML, LaTeX writers adjusted. The special characters are '<','>','|','"','{','}','[',']','^', '`'. Closes #1640, #2377.
2015-07-23Updated tests and removed a skipSpaces....John MacFarlane1-6/+6
we no longer need it with the change to toKey, and it is expensive to skip spaces after every inline.
2015-07-23Markdown Reader: Add basic tests for each header styleOphir Lifshitz1-0/+10
2015-07-23Markdown Reader: Add implicit header ref tests for headers with spacesOphir Lifshitz1-0/+20
2015-07-21Fix regression: allow HTML comments containing `--`.John MacFarlane1-0/+3
Technically this isn't allowed in an HTML comment, but we've always allowed it, and so do most other implementations. It is handy if e.g. you want to put command line arguments in HTML comments.
2015-07-14Markdown reader: don't allow bare URI links or autolinks in link label.John MacFarlane1-1/+12
Added test cases. Closes #2300.
2015-07-14Improved bare autolink detection.John MacFarlane1-0/+4
Previously we disallowed `-` at the end of an autolink, and disallowed the combination `=-`. This commit liberalizes the rules for allowing punctuation in a bare URI. Added test cases. One potential drawback is that you can no longer put a bare URI in em dashes like this this uri---http://example.com---is an example. But in this respect we now match github's treatment of bare URIs. Closes #2299.
2015-07-10Avoid parsing partial URLs as HTML tags.John MacFarlane1-0/+3
Closes #2277.
2015-05-03Make sure a closing `</div>` doesn't get included in a defn list item.John MacFarlane1-0/+4
Closes #2127.
2015-04-26Fixed regression with lists inside defintiion lists.John MacFarlane1-0/+3
This fixes a regression (not in any released version) on things like hi : - there Closes #2098.
2015-04-20MD Reader: Tests for links/footnotes after citationsNikolay Yakimov1-0/+41
In-text citation suffix clashes with links and footnotes
2015-04-18Added test case for #2062.John MacFarlane1-0/+3
2015-04-18Markdown definition lists: don't require indent for first line.John MacFarlane1-0/+3
Previously the body of the definition (after the `:` or `~` marker) needed to be in column 4. This commit relaxes that requirement, to better match the behavior of PHP Markdown Extra. So, now this is a valid definition list: foo : bar This patch also helps resolve a potentially ambiguity with table captions: foo : bar ----- table ----- Is "bar" a definition, or the caption for the table? We'll count it as a caption for the table. Closes #2087.
2015-04-17More principled fix for #1820.John MacFarlane1-0/+3
If the tag parses as a comment, we check to see if the input starts with `<!--`. If not, it's bogus comment mode and we fail htmlTag. Includes test case. Closes #1820.
2015-04-17Merge pull request #1954 from mcmtroffaes/feature/citekey-firstchar-alphanumJohn MacFarlane1-0/+22
Allow digit as first character of a citation key.
2015-04-18MD Reader: Test for smart `'` after inline mathNikolay Yakimov1-0/+3
2015-02-18Update testsMatthew Pickering1-6/+7
2015-02-18Allow digit as first character of a citation key.Matthias C. M. Troffaes1-0/+22
* Update parser to recognize citation keys starting with a digit. * Update documentation accordingly. * Test case added. See https://github.com/jgm/pandoc-citeproc/issues/97
2014-12-14Fixe autolinks with following punctuation.John MacFarlane1-0/+5
Closes #1811. The price of this is that autolinked bare URIs can no longer contain `>` characters, but this is not a big issue.
2014-09-26Fix 'Ext_lists_without_preceding_blankline' bug.Artyom1-0/+12
* Fixes #1636. * Adds a test.
2014-08-31Markdown reader: better handling of paragraph in div.John MacFarlane1-2/+2
Previously text that ended a div would be parsed as Plain unless there was a blank line before the closing div tag. Test case: <div class="first"> This is a paragraph. This is another paragraph. </div> Closes #1591.
2014-07-20Markdown reader: revised definition list syntax (closes #1429).John MacFarlane1-0/+41
* This change brings pandoc's definition list syntax into alignment with that used in PHP markdown extra and multimarkdown (with the exception that pandoc is more flexible about the definition markers, allowing tildes as well as colons). * Lazily wrapped definitions are now allowed; blank space is required between list items; and the space before definition is used to determine whether it is a paragraph or a "plain" element. * For backwards compatibility, a new extension, `compact_definition_lists`, has been added that restores the behavior of pandoc 1.12.x, allowing tight definition lists with no blank space between items, and disallowing lazy wrapping.
2014-07-10Added failing test for issue #1121.John MacFarlane1-0/+2
2014-07-07Added test for issue #1330.John MacFarlane1-0/+6
2014-07-07Reorganized some markdown tests.John MacFarlane1-11/+9
2014-07-07Revamped raw HTML block parsing in markdown.John MacFarlane1-1/+1
- We no longer include trailing spaces and newlines in the raw blocks. - We look for closing tags for elements (but without backtracking). - Each block-level tag is its own RawBlock; we no longer try to consolidate them (though `--normalize` will do so). Closes #1330.
2014-05-04Added test for #1154.John MacFarlane1-0/+9
2013-12-19HLint: redundant parensHenry de Valence1-2/+2
Remove parens enclosing a single element.
2013-11-22Fixed bug with intraword emphasis.John MacFarlane1-0/+5
Closes #1066.
2013-09-01Markdown reader: Don't autolink a bare URI that is followed by `</a>`.John MacFarlane1-1/+4
Closes #937.
2013-06-19Added test for #882.John MacFarlane1-0/+5
2013-01-23Eliminated use of TH in test suite.John MacFarlane1-1/+1
2013-01-15Changed Ext_autolink_urls -> Ext_autolink_bare_uris.John MacFarlane1-1/+1
Added tests.
2013-01-15Added lots of tests for bare URIs.John MacFarlane1-0/+91
2012-09-22Markdown reader: Fixed link parser to avoid exponential slowdowns.John MacFarlane1-0/+2
Previously the parser would hang on input like this: [[[[[[[[[[[[[[[[[[hi We fixed this by making the link parser parser characters between balanced brackets (skipping brackets in inline code spans), then parsing the result as an inline list. One change is that [hi *there]* bud](/url) is now no longer parsed as a link. But in this respect pandoc behaved differently from most other implementations anyway, so that seems okay. All current tests pass. Added test for this case. Closes #620.