token.loose

This commit is contained in:
Christopher Jeffrey 2011-08-20 10:41:30 -05:00
parent 3a28fc2222
commit 716e08f9c5

View File

@ -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 '<li>'
+ body.join(' ')
+ '</li>';
case 'loose_item_start':
/*case 'loose_item_start':
var body = [];
while (next().type !== 'list_item_end') {
body.push(tok());
}
return '<li>'
+ body.join(' ')
+ '</li>';
+ '</li>';*/
case 'html':
return inline.lexer(token.text);
case 'text':