You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Parser.js
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -123,7 +123,9 @@ export default class Parser {
123
123
124
124
html+=result
125
125
})
126
-
126
+
if(this.hooks.afterParse){
127
+
html=this.call('afterParse',html)
128
+
}
127
129
returnhtml
128
130
}
129
131
@@ -395,7 +397,7 @@ export default class Parser {
395
397
case/^{4}/.test(line):
396
398
emptyCount=0
397
399
398
-
if(this.isBlock('pre')){
400
+
if(this.isBlock('pre')||this.isBlock('list')){
399
401
this.setBlock(key)
400
402
}elseif(this.isBlock('normal')){
401
403
this.startBlock('pre',key)
@@ -455,7 +457,7 @@ export default class Parser {
455
457
break
456
458
457
459
// multi heading
458
-
case/^\s*((=|-){2,})\s*$/.test(line)&&(this.getBlock()&&!/^\s*$/.test(lines[this.getBlock()[2]])): // check if last line isn't empty
460
+
case/^\s*((=|-){2,})\s*$/.test(line)&&(this.getBlock()&&this.getBlock()[0]==='normal'&&!/^\s*$/.test(lines[this.getBlock()[2]])): // check if last line isn't empty
0 commit comments