line parsing
This commit is contained in:
parent
71f36e8b50
commit
29e887184d
@ -408,15 +408,14 @@ var tok = function() {
|
||||
case 'html':
|
||||
return inline.lexer(token.text);
|
||||
case 'text':
|
||||
var body = []
|
||||
, last = token.line;
|
||||
while (token && token.type === 'text') {
|
||||
if (token.line > last) break;
|
||||
last = token.line + 1;
|
||||
body.push(token.text);
|
||||
next();
|
||||
var body = [ token.text ]
|
||||
, last = token.line
|
||||
, top;
|
||||
while ((top = tokens[tokens.length-1])
|
||||
&& top.type === 'text'
|
||||
&& top.line === ++last) {
|
||||
body.push(next().text);
|
||||
}
|
||||
if (token) tokens.push(token);
|
||||
return '<p>'
|
||||
+ inline.lexer(body.join(' '))
|
||||
+ '</p>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user