From 9bbb0b71e10915d40c28a62af8f0e8d4719aa38f Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 28 Jan 2012 06:01:21 -0600 Subject: [PATCH] conformance: allow spaced blockquotes --- lib/marked.js | 2 +- test/new/main.html | 2 +- test/new/main.text | 4 +++- test/tests/main.html | 2 +- test/tests/main.text | 4 +++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index 4e5ab2ea..da64a6d4 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -16,7 +16,7 @@ var block = { hr: /^( *[\-*_]){3,} *(?:\n+|$)/, heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, lheading: /^([^\n]+)\n *(=|-){3,} *\n*/, - blockquote: /^( *>[^\n]+(\n[^\n]+)*)+\n*/, + blockquote: /^( *>[^\n]+(\n[^\n]+)*\n*)+/, list: /^( *)([*+-]|\d+\.) [^\0]+?(?:\n{2,}(?! )|\s*$)(?!\1bullet)\n*/, html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/, def: /^ *\[([^\]]+)\]: *([^\s]+)(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, diff --git a/test/new/main.html b/test/new/main.html index 8e33940b..efa19b27 100644 --- a/test/new/main.html +++ b/test/new/main.html @@ -1,4 +1,4 @@

A heading

Just a note, I've found that I can't test my markdown parser vs others. For example, both markdown.js and showdown code blocks in lists wrong. They're also completely inconsistent with regards to paragraphs in list items.

A link. Not anymore.

Paragraph.

Another blockquote! I really need to get more creative with mockup text.. markdown.js breaks here again

Another Heading

Hello world. Here is a link. And an image alt.

Code goes here.
+Lots of it...
  • New List Item 3 The last item
  • List Item 3 The final item.

  • List Item 4 The real final item.

  • Paragraph.


    Another blockquote! I really need to get more creative with mockup text.. markdown.js breaks here again

    Another Heading

    Hello world. Here is a link. And an image alt.

    Code goes here.
     Lots of it...
    diff --git a/test/new/main.text b/test/new/main.text index 7eb810ab..58e17a6a 100644 --- a/test/new/main.text +++ b/test/new/main.text @@ -3,7 +3,7 @@ # A heading Just a note, I've found that I can't test my markdown parser vs others. -For example, both markdown.js and showdown code blocks in lists wrong. They're +For example, both markdown.js and showdown code blocks in lists wrong. They're also completely [inconsistent][test] with regards to paragraphs in list items. A link. Not anymore. @@ -37,6 +37,8 @@ Paragraph. > * New bq Item 2 > Text here +* * * + > Another blockquote! > I really need to get > more creative with diff --git a/test/tests/main.html b/test/tests/main.html index 8e33940b..efa19b27 100644 --- a/test/tests/main.html +++ b/test/tests/main.html @@ -1,4 +1,4 @@

    A heading

    Just a note, I've found that I can't test my markdown parser vs others. For example, both markdown.js and showdown code blocks in lists wrong. They're also completely inconsistent with regards to paragraphs in list items.

    A link. Not anymore.

    Paragraph.

    Another blockquote! I really need to get more creative with mockup text.. markdown.js breaks here again

    Another Heading

    Hello world. Here is a link. And an image alt.

    Code goes here.
    +Lots of it...
  • New List Item 3 The last item
  • List Item 3 The final item.

  • List Item 4 The real final item.

  • Paragraph.


    Another blockquote! I really need to get more creative with mockup text.. markdown.js breaks here again

    Another Heading

    Hello world. Here is a link. And an image alt.

    Code goes here.
     Lots of it...
    diff --git a/test/tests/main.text b/test/tests/main.text index 7eb810ab..58e17a6a 100644 --- a/test/tests/main.text +++ b/test/tests/main.text @@ -3,7 +3,7 @@ # A heading Just a note, I've found that I can't test my markdown parser vs others. -For example, both markdown.js and showdown code blocks in lists wrong. They're +For example, both markdown.js and showdown code blocks in lists wrong. They're also completely [inconsistent][test] with regards to paragraphs in list items. A link. Not anymore. @@ -37,6 +37,8 @@ Paragraph. > * New bq Item 2 > Text here +* * * + > Another blockquote! > I really need to get > more creative with