This commit is contained in:
Christopher Jeffrey 2011-08-20 10:46:35 -05:00
parent 716e08f9c5
commit 7289385c60

View File

@ -145,11 +145,9 @@ block.token = function(str, tokens) {
item = item.replace(space, ''); item = item.replace(space, '');
} }
tokens.push({ tokens.push({
type: 'list_item_start', type: loose
loose: loose ? 'loose_item_start'
//loose : 'list_item_start'
//? 'loose_item_start'
//: 'list_item_start'
}); });
block.token(item, tokens); block.token(item, tokens);
tokens.push({ tokens.push({
@ -398,21 +396,21 @@ var tok = function() {
case 'list_item_start': case 'list_item_start':
var body = []; var body = [];
while (next().type !== 'list_item_end') { while (next().type !== 'list_item_end') {
body.push(token.type === 'text' && !token.loose body.push(token.type === 'text'
? inline.lexer(token.text) ? inline.lexer(token.text)
: tok()); : tok());
} }
return '<li>' return '<li>'
+ body.join(' ') + body.join(' ')
+ '</li>'; + '</li>';
/*case 'loose_item_start': case 'loose_item_start':
var body = []; var body = [];
while (next().type !== 'list_item_end') { while (next().type !== 'list_item_end') {
body.push(tok()); body.push(tok());
} }
return '<li>' return '<li>'
+ body.join(' ') + body.join(' ')
+ '</li>';*/ + '</li>';
case 'html': case 'html':
return inline.lexer(token.text); return inline.lexer(token.text);
case 'text': case 'text':