mirror of
https://github.com/kotaindah55/extended-markdown-syntax.git
synced 2026-07-22 05:38:06 +00:00
feat: assign blkStart at the initialization
This commit is contained in:
parent
212e4d5789
commit
a9c836cd35
1 changed files with 9 additions and 0 deletions
|
|
@ -31,6 +31,15 @@ export class ParserState {
|
|||
this.cursor = this.tree.cursor();
|
||||
this.settings = config.settings;
|
||||
this.nextCursor();
|
||||
// if previous line is a blank line or the
|
||||
// current line is the first line, then the current one
|
||||
// should be a block start
|
||||
let prevLine = this.prevLine;
|
||||
if (prevLine) {
|
||||
this.blkStart = isBlankLine(prevLine);
|
||||
} else {
|
||||
this.blkStart = true;
|
||||
}
|
||||
if (
|
||||
(!this.lastToken || this.lastToken.to < this.line.from) &&
|
||||
this.lineStr[0] == "!" && this.offset < 11
|
||||
|
|
|
|||
Loading…
Reference in a new issue