From 4e3dc98f56a6d7fbb21659548d26cfba6e9ab7fb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 8 Jun 2015 11:08:02 -0700 Subject: Clarified precedence of indentation: code block vs. list item. Added examples. --- changelog.txt | 2 ++ spec.txt | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 3199637..1071b3c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -14,6 +14,8 @@ that is not a whitespace character (as defined in the spec). * Clarified that tab expansion is a preprocessing step (#330). * Clarified lazy block quote examples (#328). + * Clarified precedence of indentation that meets conditions for + both list item continuation blocks and indented code. * Added a test case with `#` directly followed by a letter (not an ATX header). * Added two test cases illustrating that a list at the diff --git a/spec.txt b/spec.txt index 4fff84d..7b22962 100644 --- a/spec.txt +++ b/spec.txt @@ -1034,7 +1034,41 @@ paragraph.) . -The contents are literal text, and do not get parsed as Markdown: +If there is any ambiguity between an interpretation of indentation +as a code block and as indicating that material belongs to a [list +item][list items], the list item interpretation takes precedence: + +. + - foo + + bar +. + +. + +. +1. foo + + - bar +. +
    +
  1. +

    foo

    +
      +
    • bar
    • +
    +
  2. +
+. + + +The contents of a code block are literal text, and do not get parsed +as Markdown: . -- cgit v1.2.3