|
@ -145,12 +145,17 @@ LexerBlock.prototype.tokenize = function (state, startLine, endLine) { |
|
|
throw new Error('None of rules updated state.line'); |
|
|
throw new Error('None of rules updated state.line'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
line = state.line; |
|
|
|
|
|
|
|
|
|
|
|
// set state.tight iff we had an empty line before current tag
|
|
|
// set state.tight iff we had an empty line before current tag
|
|
|
// i.e. latest empty line should not count
|
|
|
// i.e. latest empty line should not count
|
|
|
state.tight = !hasEmptyLines; |
|
|
state.tight = !hasEmptyLines; |
|
|
|
|
|
|
|
|
|
|
|
// paragraph might "eat" one newline after it in nested lists
|
|
|
|
|
|
if (isEmpty(state, state.line - 1)) { |
|
|
|
|
|
hasEmptyLines = true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
line = state.line; |
|
|
|
|
|
|
|
|
if (line < endLine && isEmpty(state, line)) { |
|
|
if (line < endLine && isEmpty(state, line)) { |
|
|
hasEmptyLines = true; |
|
|
hasEmptyLines = true; |
|
|
line++; |
|
|
line++; |
|
|