Skip to content

Commit 6f896d3

Browse files
committed
ad h3
1 parent a28de2e commit 6f896d3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

view/src/app/markdown/markdown.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,11 @@ export class Markdown {
275275
}
276276
private _split(str: string): Array<string> {
277277
const strs = new Array<string>()
278-
let h1, h2, min
278+
let h1, h2, h3, min
279279
while (true) {
280280
h1 = str.indexOf('</h1>')
281281
h2 = str.indexOf('</h2>')
282+
h3 = str.indexOf('</h3>')
282283
min = -1
283284
if (h1 >= 0) {
284285
min = h1
@@ -290,6 +291,14 @@ export class Markdown {
290291
min = h2
291292
}
292293
}
294+
if (h3 >= 0) {
295+
if (min < 0) {
296+
min = h3
297+
} else if (h3 < min) {
298+
min = h3
299+
}
300+
}
301+
293302
if (min < 0) {
294303
if (str.length > 0) {
295304
strs.push(str)

0 commit comments

Comments
 (0)