aboutsummaryrefslogtreecommitdiff
path: root/tests/markdown-reader-more.native
AgeCommit message (Collapse)AuthorFilesLines
2016-11-15Allow alignments to be specified in Markdown grid tables.John MacFarlane1-0/+22
2016-10-31Added a test case with a complex raw latex environment in Markdown.John MacFarlane1-0/+2
2016-10-13Parse line-oriented markup as LineBlockAlbert Krewinkel1-2/+8
Markup-features focusing on lines as distinctive part of the markup are read into `LineBlock` elements. This currently means line blocks in reStructuredText and Markdown (the latter only if the `line_block` extension is enabled), the `linegroup`/`line` combination from the Docbook 5.1 working draft, and Org-mode `VERSE` blocks.
2016-09-28Markdown reader: added bracket syntax for native spans.John MacFarlane1-1/+3
See #168. Text.Pandoc.Options.Extension has a new constructor `Ext_brackted_spans`, which is enabled by default in pandoc's Markdown.
2016-04-10Markdown reader: Fix pandoc title blocks with lines ending in 2 spaces.John MacFarlane1-2/+2
Closes #2799. Also added -s to markdown-reader-more test.
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane1-14/+15
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-08-07Updated tests for link attribute changes.mb211-25/+25
2015-05-13Markdown reader: Made implicit header references case-insensitive.John MacFarlane1-0/+1
Added `stateHeaderKeys` to `ParserState`; this is a `KeyTable` like `stateKeys`, but it only gets consulted if we don't find a match in `stateKeys`, and if `Ext_implicit_header_references` is enabled. Closes #1606.
2015-05-13Fixed regression in charsInBalancedBrackets.John MacFarlane1-0/+2
Introduced by e9d7504. This regression caused link and image references containing raw tex not to parse correctly. Added test. Closes #2150.
2015-02-25Markdown writer: Avoid introducing spurious list items through wrapping.John MacFarlane1-1/+4
Closes #1946.
2014-12-15Don't treat a citation as a reference link label.John MacFarlane1-0/+2
Closes #1763.
2014-10-23HTML writer: Make header attributes work outside top level.John MacFarlane1-0/+2
Previously they only appeared on top level header elements. Now they work e.g. in blockquotes. Closes #1711.
2014-10-19Parsing: fixed `inlineMath` so it handles `\text{..}` containing `$`.John MacFarlane1-0/+1
For example: `$x = \text{the $n$th root of $y$}`. Closes #1677.
2014-08-14Markdown reader: Better handle quote characters in inline links.John MacFarlane1-1/+2
This was previously failing to be recognized as a link: [Test](http://en.wikipedia.org/wiki/Ward's_method) Closes #1534.
2014-08-12Markdown reader: Improved parsing of indented code in list items.John MacFarlane1-0/+9
Indented code at the beginning of a list item must be indented eight spaces from the margin (or from the edge of the container), or four spaces past the list marker, whichever is farther. Some examples in `tests/markdown-reader-more.txt`.
2014-05-27Markdown reader: inline math must have nonspace before final `$`.John MacFarlane1-0/+2
Closes #1313.
2014-05-02Fixed empty reference links. Closes #1186.John MacFarlane1-1/+4
Includes test.
2014-01-07Updated tests for latest texmath.John MacFarlane1-1/+1
2013-08-14Updated for removed unMeta, unFormat in pandoc-types.John MacFarlane1-5/+5
2013-08-10Updated tests for new Format.John MacFarlane1-5/+5
2013-06-19Added a test for #833.John MacFarlane1-1/+3
2013-03-13Markdown reader: don't lose parentheses in URLs.John MacFarlane1-1/+5
Added tests. This fixes a regression from 1.10.x. Closes #786.
2013-02-21Make `implicit_header_references` work with explicit header ids.John MacFarlane1-2/+3
(Markdown reader.)
2013-02-15Allow `&` in emails (for entities).John MacFarlane1-1/+6
Added tests for entities in titles and links. Closes #723.
2013-01-27Markdown/RST reader: Skip blank lines.John MacFarlane1-1/+7
This fixes a subtle regression involving grid tables with empty cells. Closes #732. Also added test for grid table with empty cells.
2013-01-21Markdown reader: Fixed bug with headerless grid tables.John MacFarlane1-1/+52
The 1.10 code assumed that each table header cell contains exactly one block. That failed for headerless tables (0) and also for tables with multiple blocks in a header cell. The code is fixed and tests provided. Thanks to Andrew Lee for pointing out the bug.
2013-01-15Revised URI parser.John MacFarlane1-1/+1
* It no longer uses Network.URIs URI parser, which is too restrictive (not allowing unicode URIs unless encoded). * It allows many more schemes. * It better handles punctuation so as to avoid capturing trailing punctuation in bare URLs.
2013-01-14Parsing: Fixed uri -- escape unicode URLs.John MacFarlane1-1/+1
Otherwise Network.URI.parseURI fails on e.g. Chinese URLs. Changed an incorrect test in markdown-reader-more.
2013-01-13Added tests for markdown line blocks and explicit header attributes.John MacFarlane1-1/+5
2013-01-09Added Attr field to Header.John MacFarlane1-20/+20
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2013-01-06Don't put the text of an autolink in Code font.John MacFarlane1-1/+1
2013-01-03Added tests for implicit header references.John MacFarlane1-1/+7
2012-08-01Major rewrite of markdown reader.John MacFarlane1-10/+10
* Use Builder's Inlines/Blocks instead of lists. * Return values in the reader monad, which are then run (at the end of parsing) against the final parser state. This allows links, notes, and example numbers to be resolved without a second parser pass. * An effect of using Builder is that everything is normalized automatically. * New exports from Text.Pandoc.Parsing: widthsFromIndices, NoteTable', KeyTable', Key', toKey', withQuoteContext, singleQuoteStart, singleQuoteEnd, doubleQuoteStart, doubleQuoteEnd, ellipses, apostrophe, dash * Updated opendocument tests. * Don't derive Show for ParserState. * Benchmarks: markdown reader takes 82% of the time it took before. Markdown writer takes 92% of the time (here the speedup is probably due to the fact that everything is normalized by default).
2012-02-04Complete rewrite of LaTeX reader.John MacFarlane1-1/+1
* The new reader is more robust, accurate, and extensible. It is still quite incomplete, but it should be easier now to add features. * Text.Pandoc.Parsing: Added withRaw combinator. * Markdown reader: do escapedChar before raw latex inline. Otherwise we capture commands like \{. * Fixed latex citation tests for new citeproc. * Handle \include{} commands in latex. This is done in pandoc.hs, not the (pure) latex reader. But the reader exports the needed function, handleIncludes. * Moved err and warn from pandoc.hs to Shared. * Fixed tests - raw tex should sometimes have trailing space. * Updated lhs-test for highlighting-kate changes.
2012-01-02Markdown reader: Fix parsing of consecutive lists.John MacFarlane1-1/+11
Pandoc previously behaved like Markdown.pl for consecutive lists of different styles. Thus, the following would be parsed as a single ordered list, rather than an ordered list followed by an unordered list: 1. one 2. two - one - two This patch makes pandoc behave more sensibly, parsing this as two lists. Any change in list type (ordered/unordered) or in list number style will trigger a new list. Thus, the following will also be parsed as two lists: 1. one 2. two a. one b. two Since we regard this as a bug in Markdown.pl, and not something anyone would ever rely on, we do not preserve the old behavior even when `--strict` is selected.
2011-12-02Shared: Removed unescapeURI, modified escapeURI.John MacFarlane1-3/+3
escapeURI now only escapes space characters, leaving unicode characters as they are, instead of converting them to octets and URL-encoding them, as before. This gives more readable URIs. User agents now do the percent-encoding themselves. URIs are no longer unescaped at all on conversion to markdown, asciidoc, rst, org. Closes #349.
2011-01-26Add support for attributes in inline Code.John MacFarlane1-5/+5
Additional related changes: * URLs in Code in autolinks now use class "url". * Require highlighting-kate 0.2.8.2, which omits the final <br/> tag, essential for inline code.
2011-01-26Updated tests.John MacFarlane1-1/+2
2011-01-26Distinguish latex & context environments; blank line after in writers.John MacFarlane1-2/+2
2011-01-26Bumped version to 1.8; depend on pandoc-types 1.8.John MacFarlane1-4/+4
The old TeX, HtmlInline and RawHtml elements have been removed and replaced by generic RawInline and RawBlock elements. All modules updated to use the new raw elements.
2011-01-20Updated tests for new native format.John MacFarlane1-52/+49
2011-01-06pandoc: Add newline to output unless standalone.John MacFarlane1-0/+1
This avoids output that does not end with a newline, which is inconvenient when working with many tools. Updated tests accordingly.
2010-12-10Markdown reader: Allow linebreaks in URLs (treat as spaces).John MacFarlane1-1/+1
Also, a string of consecutive spaces or tabs is now parsed as a single space. If you have multiple spaces in your URL, use %20%20.
2010-12-06Markdown reader: handle curly quotes better.John MacFarlane1-1/+4
Previously, curly quotes were just parsed literally, leading to problems in some output formats. Now they are parsed as Quoted inlines, if --smart is specified. Resolves Issue #270.
2010-12-05Fix regression: markdown references should be case-insensitive.John MacFarlane1-1/+5
This broke when we added the Key type. We had assumed that the custom case-insensitive Ord instance would ensure case-insensitive matching, but that is not how Data.Map works. * Added a test case for case-insensitivity in markdown-reader-more * Removed old refsMatch from Text.Pandoc.Parsing module; * hid the 'Key' constructor; * dropped the custom Ord and Eq instances, deriving instead; * added fromKey and toKey to convert between Keys and Inline lists; * toKey ensures that keys are case-insensitive, since this is the only way the API provides to construct a Key. Resolves Issue #272.
2010-11-09Allow HTML comments as inline elements in markdown.John MacFarlane1-2/+2
So, aaa <!-- comment --> bbb can be a single paragraph.
2010-10-26Added test for macros.John MacFarlane1-1/+3
2010-07-20Made spacing at end of output more consistent.John MacFarlane1-1/+0
Previously some of the writers added spurious whitespace. This has been removed, resolving Issue #232. NOTE: If your application combines pandoc's output with other text, for example in a template, you may need to add spacing. For example, a pandoc-generated markdown file will not have a blank line after the final block element. If you are inserting it into another markdown file, you will need to make sure there is a blank line between it and the next block element.
2010-07-12Added tests for example lists.John MacFarlane1-1/+9
2010-03-23Added multilingual URL tests for markdown reader.John MacFarlane1-1/+5