diff --git a/src/subParsers/blockQuotes.js b/src/subParsers/blockQuotes.js index 4b1782f..9aa0115 100644 --- a/src/subParsers/blockQuotes.js +++ b/src/subParsers/blockQuotes.js @@ -25,6 +25,7 @@ showdown.subParser('blockQuotes', function (text, options, globals) { bq = bq.replace(/~0/g, ''); bq = bq.replace(/^[ \t]+$/gm, ''); // trim whitespace-only lines + bq = showdown.subParser('githubCodeBlocks')(bq, options, globals); bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse bq = bq.replace(/(^|\n)/g, '$1 '); diff --git a/test/cases/github-style-codeblock-inside-quote.html b/test/cases/github-style-codeblock-inside-quote.html new file mode 100644 index 0000000..85fa51c --- /dev/null +++ b/test/cases/github-style-codeblock-inside-quote.html @@ -0,0 +1,15 @@ +
+diff --git a/test/cases/github-style-codeblock-inside-quote.md b/test/cases/github-style-codeblock-inside-quote.md new file mode 100644 index 0000000..23c4714 --- /dev/null +++ b/test/cases/github-style-codeblock-inside-quote.md @@ -0,0 +1,13 @@ +> Define a function in javascript: +> +> ``` +> function MyFunc(a) { +> var s = '`'; +> } +> ``` +> +>> And some nested quote +>> +>> ```html +>>Define a function in javascript:
+ ++ +function MyFunc(a) { + var s = '`'; + } +
++And some nested quote
+ ++<div>HTML!</div> +