pandoc/test
John MacFarlane a31241a08b Markdown reader: use CommonMark rules for list item nesting.
Closes #3511.

Previously pandoc used the four-space rule: continuation paragraphs,
sublists, and other block level content had to be indented 4
spaces.  Now the indentation required is determined by the
first line of the list item:  to be included in the list item,
blocks must be indented to the level of the first non-space
content after the list marker. Exception: if are 5 or more spaces
after the list marker, then the content is interpreted as an
indented code block, and continuation paragraphs must be indented
two spaces beyond the end of the list marker.  See the CommonMark
spec for more details and examples.

Documents that adhere to the four-space rule should, in most cases,
be parsed the same way by the new rules.  Here are some examples
of texts that will be parsed differently:

    - a
      - b

will be parsed as a list item with a sublist; under the four-space
rule, it would be a list with two items.

    - a

          code

Here we have an indented code block under the list item, even though it
is only indented six spaces from the margin, because it is four spaces
past the point where a continuation paragraph could begin.  With the
four-space rule, this would be a regular paragraph rather than a code
block.

    - a

            code

Here the code block will start with two spaces, whereas under
the four-space rule, it would start with `code`.  With the four-space
rule, indented code under a list item always must be indented eight
spaces from the margin, while the new rules require only that it
be indented four spaces from the beginning of the first non-space
text after the list marker (here, `a`).

This change was motivated by a slew of bug reports from people
who expected lists to work differently (#3125, #2367, #2575, #2210,
 #1990, #1137, #744, #172, #137, #128) and by the growing prevalance
of CommonMark (now used by GitHub, for example).

Users who want to use the old rules can select the `four_space_rule`
extension.

* Added `four_space_rule` extension.
* Added `Ext_four_space_rule` to `Extensions`.
* `Parsing` now exports `gobbleAtMostSpaces`, and the type
  of `gobbleSpaces` has been changed so that a `ReaderOptions`
  parameter is not needed.
2017-08-19 15:45:01 -07:00
..
command Markdown reader: use CommonMark rules for list item nesting. 2017-08-19 15:45:01 -07:00
docx Docx reader: Add tests for avoiding zero-level header. 2017-08-06 19:36:25 -07:00
epub Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
fb2 Don't allow backslash + newline to affect block structure. 2017-06-11 22:24:20 +02:00
lua data/pandoc.lua: regularize constructors. 2017-06-29 17:08:59 +02:00
media Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
odt Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
Tests RST reader/writer: support unknown interpreted text roles... 2017-08-17 16:01:44 -07:00
bodybg.gif Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
docbook-reader.docbook Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
docbook-reader.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
docbook-xref.docbook Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
docbook-xref.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
dokuwiki_external_images.dokuwiki Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
dokuwiki_external_images.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
dokuwiki_inline_formatting.dokuwiki Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
dokuwiki_inline_formatting.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
dokuwiki_multiblock_table.dokuwiki Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
dokuwiki_multiblock_table.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
haddock-reader.haddock Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
haddock-reader.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
html-reader.html Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
html-reader.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
insert Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
lalune.jpg Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
latex-reader.latex Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
latex-reader.native Make sure \write18 is parsed as raw LaTeX. 2017-07-12 14:50:49 +02:00
lhs-test-markdown.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
lhs-test.fragment.html+lhs Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
lhs-test.html Implement multicolumn support for slide formats. 2017-08-14 23:17:44 -07:00
lhs-test.html+lhs Implement multicolumn support for slide formats. 2017-08-14 23:17:44 -07:00
lhs-test.latex Update tests for changes to LaTeX template. 2017-08-14 13:19:54 -07:00
lhs-test.latex+lhs Update tests for changes to LaTeX template. 2017-08-14 13:19:54 -07:00
lhs-test.markdown Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
lhs-test.markdown+lhs Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
lhs-test.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
lhs-test.rst Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
lhs-test.rst+lhs Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
markdown-citations.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
markdown-citations.txt Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
markdown-reader-more.native Markdown reader: use CommonMark rules for list item nesting. 2017-08-19 15:45:01 -07:00
markdown-reader-more.txt Markdown reader: use CommonMark rules for list item nesting. 2017-08-19 15:45:01 -07:00
mediawiki-reader.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
mediawiki-reader.wiki Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
movie.jpg Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
opml-reader.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
opml-reader.opml Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
pipe-tables.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
pipe-tables.txt Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
rst-reader.native RST reader: support scale and align attributes of images. 2017-02-26 23:40:31 +01:00
rst-reader.rst Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
s5-basic.html Implement multicolumn support for slide formats. 2017-08-14 23:17:44 -07:00
s5-fancy.html Implement multicolumn support for slide formats. 2017-08-14 23:17:44 -07:00
s5-fragment.html Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
s5-inserts.html Implement multicolumn support for slide formats. 2017-08-14 23:17:44 -07:00
s5.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables-rstsubset.native Combine grid table parsers 2017-05-11 00:17:56 +02:00
tables.asciidoc Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.context Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.docbook4 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.docbook5 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.dokuwiki Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.fb2 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.haddock Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.html4 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.html5 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.icml Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.jats JATS writer: put references in <back>. 2017-03-31 11:07:09 +02:00
tables.latex Updated table tests. 2017-02-23 22:34:10 +01:00
tables.man Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.markdown Markdown writer: Avoid spurious blanklines at end of document... 2017-03-08 12:47:39 +01:00
tables.mediawiki Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.ms Ms writer: respect text wrapping options. 2017-04-05 15:17:35 +02:00
tables.muse Muse writer: Indent tables with one space (#3649) 2017-05-07 21:41:38 +02:00
tables.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.opendocument Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.org Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.plain Markdown writer: Avoid spurious blanklines at end of document... 2017-03-08 12:47:39 +01:00
tables.rst Grid tables: remove unnecessary extra space in cells. 2017-03-23 14:59:51 +01:00
tables.rtf Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.tei Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.texinfo Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.textile Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.txt Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tables.zimwiki ZimWiki writer: removed internal formatting from note and table cells, because ZimWiki does not support it (#3446) 2017-02-15 11:28:02 +01:00
test-pandoc.hs Add Muse reader (#3620) 2017-06-19 10:46:02 +02:00
testsuite.native Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
testsuite.txt Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
textile-reader.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
textile-reader.textile Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
tikiwiki-reader.native Added TikiWiki reader (#3800) 2017-07-21 10:09:54 +02:00
tikiwiki-reader.tikiwiki Added TikiWiki reader (#3800) 2017-07-21 10:09:54 +02:00
twiki-reader.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
twiki-reader.twiki Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
txt2tags.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
txt2tags.t2t Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
vimwiki-reader.native Fixed #3760. (#3784) 2017-07-12 17:19:49 +02:00
vimwiki-reader.wiki Fixed #3760. (#3784) 2017-07-12 17:19:49 +02:00
writer.asciidoc Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.context Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.docbook4 Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.docbook5 Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.dokuwiki Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.fb2 Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.haddock Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.html4 Implement multicolumn support for slide formats. 2017-08-14 23:17:44 -07:00
writer.html5 Implement multicolumn support for slide formats. 2017-08-14 23:17:44 -07:00
writer.icml Allow em for image height/width in HTML, LaTeX. 2017-05-25 22:48:27 +02:00
writer.jats Updated jats tests for new texmath version. 2017-06-30 20:50:37 +02:00
writer.latex Update tests for changes to LaTeX template. 2017-08-14 13:19:54 -07:00
writer.man Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.markdown Markdown writer: better escaping of < and >. 2017-07-30 13:45:22 -07:00
writer.mediawiki Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.ms Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.muse Muse writer: update test results (#3845) 2017-08-08 16:43:50 -07:00
writer.native Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.opendocument Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.opml Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.org Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.plain Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.rst Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.rtf Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.tei Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.texinfo Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.textile Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writer.zimwiki Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
writers-lang-and-dir.context ConTeXt template: improved font handling. 2017-05-06 14:58:32 +02:00
writers-lang-and-dir.latex Update tests for changes to LaTeX template. 2017-08-14 13:19:54 -07:00
writers-lang-and-dir.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00