From 716e08f9c55ca05f84e161698fef520fabc4c97d Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 20 Aug 2011 10:41:30 -0500 Subject: [PATCH] token.loose --- lib/marked.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index 244e626b..1d8f815f 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -145,9 +145,11 @@ block.token = function(str, tokens) { item = item.replace(space, ''); } tokens.push({ - type: loose - ? 'loose_item_start' - : 'list_item_start' + type: 'list_item_start', + loose: loose + //loose + //? 'loose_item_start' + //: 'list_item_start' }); block.token(item, tokens); tokens.push({ @@ -396,21 +398,21 @@ var tok = function() { case 'list_item_start': var body = []; while (next().type !== 'list_item_end') { - body.push(token.type === 'text' + body.push(token.type === 'text' && !token.loose ? inline.lexer(token.text) : tok()); } return '
  • ' + body.join(' ') + '
  • '; - case 'loose_item_start': + /*case 'loose_item_start': var body = []; while (next().type !== 'list_item_end') { body.push(tok()); } return '
  • ' + body.join(' ') - + '
  • '; + + '';*/ case 'html': return inline.lexer(token.text); case 'text':