pandoc/test/command
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
..
256.md Added test for #256. 2017-03-16 22:31:36 +01:00
262.md RST reader: support anchors. 2017-06-27 15:03:16 +02:00
512.md Update command tests to include stderr output. 2017-05-25 11:52:09 +02:00
645.md LaTeX writer: don't use lstinline it \item[..]. 2017-04-28 12:03:59 +02:00
853.md RST reader: support RST-style citations. 2017-03-03 22:23:01 +01:00
934.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
982.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
987.md Expand \newenvironment macros. 2017-03-10 09:46:32 +01:00
1166.md RST reader: Handle multiline cells in simple tables. 2017-03-02 16:48:53 +01:00
1279.md Parse YAML metadata in a context that sees footnotes... 2017-03-05 01:36:40 +01:00
1390.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
1592.md Fixed some loose ends in #1592. 2017-03-04 23:01:29 +01:00
1629.md LaTeX writer: Fix problem with escaping in lstinline. 2017-04-29 11:05:44 +02:00
1710.md Implement multicolumn support for slide formats. 2017-08-14 23:17:44 -07:00
1718.md Update command tests to include stderr output. 2017-05-25 11:52:09 +02:00
1745.md Improved behavior of auto_identifiers when there are explicit ids. 2017-03-12 21:30:04 +01:00
1773.md When parsing raw LaTeX commands, include trailing space. 2017-02-22 21:15:25 +01:00
1841.md Markdown reader: improved parsing of indented raw HTML blocks. 2017-05-06 22:56:16 +02:00
1881.md HTML reader: support column alignments. 2017-08-17 12:08:32 -07:00
1905.md Better handling of \part in LaTeX. 2017-03-13 22:11:10 +01:00
2118.md LaTeX reader: Use label instead of data-label for label in caption. 2017-08-09 09:15:50 -07:00
2228.md Markdown reader: fixed smart quotes after emphasis. 2017-05-24 23:23:08 +02:00
2378.md Fixed footnotes in table captions. 2017-06-20 11:21:32 +02:00
2397.md Markdown reader: fixed internal header links. 2017-03-05 16:34:47 +01:00
2434.md Markdown reader: use CommonMark rules for list item nesting. 2017-08-19 15:45:01 -07:00
2602.md Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
2606.md MediaWiki reader: ensure that list starts begin at left margin. 2017-02-21 23:41:32 +01:00
2649.md MediaWiki reader: fixed more table issues. 2017-02-21 21:28:24 +01:00
2662.md RST reader: support scale and align attributes of images. 2017-02-26 23:40:31 +01:00
2834.md Markdown writer: Avoid spurious blanklines at end of document... 2017-03-08 12:47:39 +01:00
2874.md LaTeX writer: fix error with line breaks after empty content. 2017-04-25 15:00:27 +02:00
2994.md Fixed command test #2994 on Windows. 2017-08-16 09:47:25 -07:00
3113.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
3236.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
3257.md HTML reader: Better sanity checks on raw HTML. 2017-03-18 22:43:57 +01:00
3309.md Markdown reader: Treat certain environments as inline 2017-03-07 15:00:32 +01:00
3314.md Org reader: support table.el tables 2017-05-03 22:43:34 +02:00
3337.md Markdown writer: Avoid spurious blanklines at end of document... 2017-03-08 12:47:39 +01:00
3348.md Removed failing part of 3348 test. 2017-03-19 20:37:39 +01:00
3401.md Org reader: support macros 2017-05-06 11:00:32 +02:00
3407.md RST reader/writer: support unknown interpreted text roles... 2017-08-17 16:01:44 -07:00
3422.md LaTeX writer: Fix problem with escaping in lstinline. 2017-04-29 11:05:44 +02:00
3432.md RST Reader: parse list table directive (#3688) 2017-05-23 20:53:04 +02:00
3432a.md Fixed small bug in RST list parsing. 2017-02-11 20:55:13 +01:00
3450.md Allow em for image height/width in HTML, LaTeX. 2017-05-25 22:48:27 +02:00
3475.md RST reader: implemented implicit internal header links. 2017-02-28 10:32:36 +01:00
3487.md Markdown writer: Avoid spurious blanklines at end of document... 2017-03-08 12:47:39 +01:00
3494.md Make sure \write18 is parsed as raw LaTeX. 2017-07-12 14:50:49 +02:00
3497.md Added test case for #3497. 2017-03-08 12:23:01 +01:00
3499.md Org reader: disallow tables on list marker lines 2017-03-08 15:45:00 +01:00
3510-export.latex Org reader: add basic file inclusion mechanism 2017-05-14 12:45:31 +02:00
3510-src.hs Org reader: add basic file inclusion mechanism 2017-05-14 12:45:31 +02:00
3510-subdoc.org Org reader: add basic file inclusion mechanism 2017-05-14 12:45:31 +02:00
3510.md Org reader: add basic file inclusion mechanism 2017-05-14 12:45:31 +02:00
3511.md Markdown reader: use CommonMark rules for list item nesting. 2017-08-19 15:45:01 -07:00
3512.md Add space_in_atx_header extension. 2017-03-20 21:55:30 +01:00
3516.md Combine grid table parsers 2017-05-11 00:17:56 +02:00
3518.md Improve rendering of superscript in plain output. 2017-03-21 14:43:14 +01:00
3526.md Pipe tables: impose minimum cell size. 2017-03-23 16:54:47 +01:00
3529.md Markdown writer: don't emit a simple table if simple_tables disabled. 2017-03-24 16:11:56 +01:00
3530.md LaTeX reader: add support for LaTeX subfiles package. 2017-03-27 21:20:27 +02:00
3531.md Add blank lines to #3531 command test. 2017-03-26 20:48:54 +02:00
3533-rst-csv-tables.csv RST reader: implement csv-table directive. 2017-08-10 15:01:14 -07:00
3533-rst-csv-tables.md RST reader: implement csv-table directive. 2017-08-10 15:01:14 -07:00
3534.md lstinline with braces can be used (verb cannot be used with braces) (#3535) 2017-03-29 14:49:46 +02:00
3537.md Text.Pandoc.Extensions: Added Ext_raw_attribute. 2017-06-23 00:37:13 +02:00
3539.md LaTeX reader: add Support for glossaries and acronym package (#3589) 2017-08-16 10:24:46 -07:00
3558.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
3568.md Man writer: Fix handling of nested font commands. 2017-04-12 12:23:29 +02:00
3570.md Avoid parsing "Notes:**" as a bare URI. 2017-04-15 13:32:28 +02:00
3577.md Make sure \write18 is parsed as raw LaTeX. 2017-07-12 14:50:49 +02:00
3585.md MediaWiki reader: don't do curly quotes inside <tt> contexts. 2017-05-25 09:35:25 +02:00
3587.md Add siunitx Support (#3588) 2017-04-22 21:57:21 +02:00
3596.md HTML reader: Revise treatment of li with id attribute. 2017-04-23 11:03:48 +02:00
3615.md Markdown writer: Case-insensitive reference links. (#3616) 2017-05-02 09:00:37 +02:00
3619.md Markdown writer: better escaping for links (#3628) 2017-05-03 12:19:45 +02:00
3630.md Markdown Writer: put space before reference link definitions 2017-05-03 12:13:25 +02:00
3667.md Textile reader: fix bug for certain links in table cells. 2017-05-15 20:36:11 +02:00
3674.md Markdown: allow attributes in reference links to start on next line. 2017-05-18 13:20:32 +02:00
3675.md RST writer: add empty comments when needed... 2017-05-19 21:05:15 +02:00
3681.md Add LaTeX xspace support (#3797) 2017-07-13 20:56:59 +02:00
3690.md Parsing: Provide parseFromString'. 2017-05-24 22:41:47 +02:00
3701.md Markdown writer: changes to --reference-links. 2017-05-27 23:18:45 +02:00
3706.md Org reader: recognize babel result blocks with attributes 2017-05-31 20:01:04 +02:00
3708.md LaTeX reader: handle escaped & inside table cell. 2017-05-29 22:47:04 +02:00
3715.md Markdown writer: Avoid inline surround-marking with empty content. 2017-06-01 12:30:58 +02:00
3716.md HTML writer: Avoid two class attributes when adding 'uri' class. 2017-06-01 18:41:54 +02:00
3730.md Don't allow backslash + newline to affect block structure. 2017-06-11 22:24:20 +02:00
3733.md Markdown reader: fixed parsing of fenced code after list... 2017-08-18 21:46:55 -07:00
3734.md CommonMark writer: prefer pipe tables to HTML tables... 2017-08-13 10:43:43 -07:00
3736.md Markdown writer: don't allow soft break in header. 2017-06-12 09:23:30 +02:00
3755.md Markdown reader: interpret YAML metadata as Inlines when possible. 2017-06-23 22:31:08 +02:00
3773.md Markdown writer: Ensure that + and - are escaped properly... 2017-06-30 17:41:25 +02:00
3779.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
3792.md Escape MetaString values (as added with --metadata flag). 2017-08-12 20:27:42 -07:00
3794.md HTML reader: Ensure that paragraphs are closed properly... 2017-07-11 15:52:38 +02:00
3803.md LaTeX reader: fixed regression with starred environment names. 2017-07-19 17:30:22 +02:00
3804.md LaTeX reader: handle optional args in raw \titleformat. 2017-07-21 09:28:36 +02:00
3816.md Small tweak in test (add --wrap=preserve). 2017-07-26 12:55:15 +02:00
3824.md DokuWiki reader: better handling for code block in list item. 2017-08-02 10:33:08 -07:00
3840.md Markdown reader: fixed spurious parsing as citation as reference def. 2017-08-07 21:00:57 -07:00
3853.md LaTeX reader: implement \newtoggle, \iftoggle, \toggletrue|false 2017-08-18 10:13:41 -07:00
abbrevs Added test for #256. 2017-03-16 22:31:36 +01:00
corrupt.svg Improve SVG image size code. 2017-05-20 23:09:08 +02:00
custom-attributes.html HTML writer: insert data- in front of unsupported attributes. 2017-07-25 13:13:24 +02:00
dots.md LaTeX reader: Add support for \vdots (#3607) 2017-04-26 12:03:07 +02:00
gfm.md CommonMark writer: avoid excess blank lines at end of output. 2017-08-08 14:00:13 -07:00
hspace.md LaTeX reader: allow hspace and vspace to count as raw block or inline. 2017-02-25 12:43:00 +01:00
html-read-figure.md HTML Reader: parse figure and figcaption (#3813) 2017-07-22 19:22:56 +02:00
hyphenat.md LaTeX reader: Add basic support for hyphenat package (#3603) 2017-04-26 12:05:13 +02:00
ifstrequal.md LaTeX reader: support etoolbox's ifstrequal. 2017-07-24 11:20:59 +02:00
inkscape-cube.svg Improve SVG image size code. 2017-05-20 23:09:08 +02:00
latex-color.md Add \colorbox support 2017-06-01 09:50:51 +02:00
latex-fontawesome.md Support for \faCheck and \faClose (#3727) 2017-06-11 07:47:42 +02:00
latex-tabular-column-specs.md LaTeX reader: properly handle column prefixes/suffixes. 2017-02-13 22:39:59 +01:00
lstlisting.md Fix keyval funtion: pandoc did not parse options in braces correctly.… (#3642) 2017-05-06 15:09:29 +02:00
macros.md LaTeX reader: Support simple \def macros. 2017-08-07 16:06:19 -07:00
md-abbrevs.md Added a markdown abbrevation test case. 2017-03-05 10:44:25 +01:00
multiple-metadata-blocks.md Markdown reader: Fixed regression on left-biased union for metadata. 2017-03-05 09:28:44 +01:00
parse-raw.md Update command tests to include stderr output. 2017-05-25 11:52:09 +02:00
refs.md LaTeX reader: use Link instead of Span for \ref. 2017-08-16 10:56:12 -07:00
smart.md More smart escaping tests. 2017-02-04 22:09:19 +01:00
sub-file-chapter-1.tex LaTeX reader: add support for LaTeX subfiles package. 2017-03-27 21:20:27 +02:00
sub-file-chapter-2.tex LaTeX reader: add support for LaTeX subfiles package. 2017-03-27 21:20:27 +02:00
svg.md Allow em for image height/width in HTML, LaTeX. 2017-05-25 22:48:27 +02:00
SVG_logo-without-xml-declaration.svg Improve SVG image size code. 2017-05-20 23:09:08 +02:00
SVG_logo.svg Improve SVG image size code. 2017-05-20 23:09:08 +02:00
tabularx.md LaTeX reader: handle some width specifiers on table columns. 2017-06-01 12:08:28 +02:00
translations.md LaTeX reader: Fixed space after \figurename etc. 2017-08-12 13:40:28 -07:00
vars-and-metadata.md Added test case for variables/metadata in Markdown writer. 2017-02-25 23:54:30 +01:00
write18.md Make sure \write18 is parsed as raw LaTeX. 2017-07-12 14:50:49 +02:00