From b5b4683179d70d4e1f2cbda753e048703b592288 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 10 Mar 2014 00:59:17 -0500 Subject: [PATCH] Revert "use renderer for task lists. see #107 #111." This reverts commit a5e39a6a59a91a7c8fa88e9113ba4dde7264e33b. --- lib/marked.js | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index 9af989ce78..dbcd573a0b 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -378,7 +378,7 @@ Lexer.prototype.token = function(src, top, bq) { } // task (gfm) - if (top && (cap = this.rules.task.exec(src))) { + if (top && (cap = this.rules.task.exec(src)) { src = src.substring(cap[0].length); this.tokens.push({ @@ -806,21 +806,6 @@ Renderer.prototype.code = function(code, lang, escaped) { + '\n\n'; }; -Renderer.prototype.tasklist = function(text) { - return '\n'; -}; - -Renderer.prototype.taskitem = function(text, checked, disabled, i) { - return '
  • '; -}; - Renderer.prototype.blockquote = function(quote) { return '
    \n' + quote + '
    \n'; }; @@ -1029,14 +1014,19 @@ Parser.prototype.tok = function() { , i = 1; while (this.next().type !== 'task_list_end') { - body += this.renderer.taskitem( - this.inline.output(this.token.text), - this.token.checked, - this.token.disabled, - i++); + body += '
  • '; } - return this.renderer.tasklist(body); + return ''; } case 'table': { var header = ''