git.iko.soy/typeable/pandoc
on master help sign in
README: Added section on four-space rule for lists.
798c5d5John MacFarlane
README+35−6
@@ -830,10 +830,25 @@ The bullets need not be flush with the left margin; they may be
830indented one, two, or three spaces. The bullet must be followed
830indented one, two, or three spaces. The bullet must be followed
831by whitespace.
831by whitespace.
832
832
833+List items look best if subsequent lines are flush with the first
834+line (after the bullet):
835+
836+ * here is my first
837+ list item.
838+ * and my second.
839+
840+But markdown also allows a "lazy" format:
841+
842+ * here is my first
843+ list item.
844+ * and my second.
845+
846+### The four-space rule ###
847+
833A list item may contain multiple paragraphs and other block-level
848A list item may contain multiple paragraphs and other block-level
834−content. Subsequent paragraphs must be preceded by a blank line
849+content. However, subsequent paragraphs must be preceded by a blank line
835−and indented four spaces or a tab. The list will look better if
850+and indented four spaces or a tab. The list will look better if the first
836−the first paragraph is aligned with the rest:
851+paragraph is aligned with the rest:
837
852
838 * First paragraph.
853 * First paragraph.
839
854
@@ -858,9 +873,9 @@ one tab:
858 + brocolli
873 + brocolli
859 + chard
874 + chard
860
875
861−Markdown allows you to write list items "lazily," instead of
876+As noted above, markdown allows you to write list items "lazily," instead of
862−indenting continuation lines. However, if there are multiple paragraphs
877+indenting continuation lines. However, if there are multiple paragraphs or
863−or other blocks in a list item, the first line of each must be indented.
878+other blocks in a list item, the first line of each must be indented.
864
879
865 + A lazy, lazy, list
880 + A lazy, lazy, list
866 item.
881 item.
@@ -871,6 +886,20 @@ or other blocks in a list item, the first line of each must be indented.
871 Second paragraph of second
886 Second paragraph of second
872 list item.
887 list item.
873
888
889+**Note:** Although the four-space rule for continuation paragraphs
890+comes from the official [markdown syntax guide], the reference implementation,
891+`Markdown.pl`, does not follow it. So pandoc will give different results than
892+`Markdown.pl` when authors have indented continuation paragraphs fewer than
893+four spaces.
894+
895+The [markdown syntax guide] is not explicit whether the four-space
896+rule applies to *all* block-level content in a list item; it only
897+mentions paragraphs and code blocks. But it implies that the rule
898+applies to all block-level content (including nested lists), and
899+pandoc interprets it that way.
900+
901+ [markdown syntax guide]:
902+ http://daringfireball.net/projects/markdown/syntax#list
874
903
875### Ordered lists ###
904### Ordered lists ###
876
905