08256ec
--- a/lib/marked.js
08256ec
+++ b/lib/marked.js
08256ec
@@ -18,8 +18,8 @@
08256ec
   heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
08256ec
   nptable: noop,
08256ec
   lheading: /^([^\n]+)\n *(=|-){3,} *\n*/,
08256ec
-  blockquote: /^( *>[^\n]+(\n[^\n]+)*\n*)+/,
08256ec
-  list: /^( *)(bull) [\s\S]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
08256ec
+  blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,
08256ec
+  list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
08256ec
   html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,
08256ec
   def: /^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
08256ec
   table: noop,
08256ec
@@ -36,6 +36,11 @@
08256ec
 block.list = replace(block.list)
08256ec
   (/bull/g, block.bullet)
08256ec
   ('hr', /\n+(?=(?: *[-*_]){3,} *(?:\n+|$))/)
08256ec
+  ('def', '\\n+(?=' + block.def.source + ')')
08256ec
+  ();
08256ec
+
08256ec
+block.blockquote = replace(block.blockquote)
08256ec
+  ('def', block.def)
08256ec
   ();
08256ec
 
08256ec
 block._tag = '(?!(?:'
08256ec
@@ -139,7 +144,7 @@
08256ec
  * Lexing
08256ec
  */
08256ec
 
08256ec
-Lexer.prototype.token = function(src, top) {
08256ec
+Lexer.prototype.token = function(src, top, bq) {
08256ec
   var src = src.replace(/^ +$/gm, '')
08256ec
     , next
08256ec
     , loose
08256ec
@@ -262,7 +267,7 @@
08256ec
       // Pass `top` to keep the current
08256ec
       // "toplevel" state. This is exactly
08256ec
       // how markdown.pl works.
08256ec
-      this.token(cap, top);
08256ec
+      this.token(cap, top, true);
08256ec
 
08256ec
       this.tokens.push({
08256ec
         type: 'blockquote_end'
08256ec
@@ -335,7 +340,7 @@
08256ec
         });
08256ec
 
08256ec
         // Recurse.
08256ec
-        this.token(item, false);
08256ec
+        this.token(item, false, bq);
08256ec
 
08256ec
         this.tokens.push({
08256ec
           type: 'list_item_end'
08256ec
@@ -363,7 +368,7 @@
08256ec
     }
08256ec
 
08256ec
     // def
08256ec
-    if (top && (cap = this.rules.def.exec(src))) {
08256ec
+    if ((!bq && top) && (cap = this.rules.def.exec(src))) {
08256ec
       src = src.substring(cap[0].length);
08256ec
       this.tokens.links[cap[1].toLowerCase()] = {
08256ec
         href: cap[2],