Skip to content

Commit 3a209c9

Browse files
committed
fix
1 parent d0eafdc commit 3a209c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

copypasta/template/leetcode/generator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,14 +433,14 @@ func (p *problem) parseHTML(session *grequests.Session) (err error) {
433433
raw := o.FirstChild.Data
434434
sp := strings.Split(raw, "`")
435435
for i, s := range sp {
436-
if strings.Contains(s, ">输入") {
436+
if strings.Contains(s, ">输入") || strings.Contains(s, "> 输入") {
437437
text := sp[i+1]
438438
if !p.isFuncProblem {
439439
// https://leetcode-cn.com/contest/season/2020-fall/problems/IQvJ9i/
440440
text += "\n" + sp[i+3] // 跳过 sp[i+2]
441441
}
442442
p.sampleIns = append(p.sampleIns, p.parseSampleText(text, true))
443-
} else if strings.Contains(s, ">输出") {
443+
} else if strings.Contains(s, ">输出") || strings.Contains(s, "> 输出") {
444444
p.sampleOuts = append(p.sampleOuts, p.parseSampleText(sp[i+1], true))
445445
}
446446
}

0 commit comments

Comments
 (0)