diff --git a/lib/renderer.js b/lib/renderer.js index 5ab32a5..7bc02e3 100644 --- a/lib/renderer.js +++ b/lib/renderer.js @@ -17,20 +17,6 @@ function Renderer() { require('util').inherits(Renderer, MarkedRenderer); -// Support To-Do List -Renderer.prototype.listitem = function(text) { - var result; - - if (/^\s*\[[x ]\]\s*/.test(text)) { - text = text.replace(/^\s*\[ \]\s*/, ' ').replace(/^\s*\[x\]\s*/, ' '); - result = '
  • ' + text + '
  • \n'; - } else { - result = '
  • ' + text + '
  • \n'; - } - - return result; -}; - // Add id attribute to headings Renderer.prototype.heading = function(text, level) { var transformOption = this.options.modifyAnchors; diff --git a/test/index.js b/test/index.js index b6b1093..382a8c6 100644 --- a/test/index.js +++ b/test/index.js @@ -59,30 +59,6 @@ describe('Marked renderer', function() { result.should.eql('

    中文

    '); }); - it('to-do list testing', function() { - var body = [ - '- [ ] test unchecked', - '- [x] test checked', - '- normal list [x] [ ]', - '', - 'normal text [x] [ ]', - '', - '[x] [ ] normal text' - ].join('\n'); - - var result = r({text: body}); - - result.should.eql([ - '\n', - '

    normal text [x] [ ]

    \n', - '

    [x] [ ] normal text

    \n' - ].join('')); - }); - // Description List tests it('should render description lists with a single space after the colon', function() {