Skip to content

Commit

Permalink
fix: improve output match regex
Browse files Browse the repository at this point in the history
  • Loading branch information
j178 committed Sep 5, 2024
1 parent 49a950b commit ef98d12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion leetcode/question.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ func (q *QuestionData) GetExampleTestCases() []string {
// m multi-line mode: ^ and $ match begin/end line in addition to begin/end text (default false)
// s let . match \n (default false)
var (
htmlPattern = regexp.MustCompile(`(?si)<strong>(?:Output|输出)[::]?\s*</strong>\s*([^<]+)`)
htmlPattern = regexp.MustCompile(`(?si)<strong>(?:Output|输出)[::]?\s*</strong>\s*(?:<span[^>]*>)?\s*([^<]+)\s*(?:</span>)?`)
markdownPattern = regexp.MustCompile("(?si)(?:Output|输出)[::]?\\s*`?([^`]+)")
)

Expand Down

0 comments on commit ef98d12

Please sign in to comment.