Skip to content

Commit a7517aa

Browse files
author
openset
committed
Update: topic tag
1 parent 608e588 commit a7517aa

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

internal/leetcode/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ const (
2525
questionDataFile = "question_data_%s.json"
2626
questionArticleFile = "question_article_%s.html"
2727
topicTagFile = "topic_tag_%s.json"
28-
tagsFile = "tag/tags.json"
2928
)

internal/leetcode/topic_tag.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import (
1111
"github.com/openset/leetcode/internal/client"
1212
)
1313

14-
var initTags []tagType
14+
var (
15+
initTags []tagType
16+
tagsFile = path.Join("tag", "tags.json")
17+
)
1518

1619
func init() {
1720
html := remember(problemsetAllFile, 7, func() []byte {
@@ -124,7 +127,7 @@ func (tag tagType) SaveContents() {
124127
})
125128
var buf bytes.Buffer
126129
buf.WriteString(authInfo("tag"))
127-
buf.WriteString(fmt.Sprintf("\n## %s\n\n", tag.ShowName()))
130+
buf.WriteString(fmt.Sprintf("\n## [话题分类](https://github.com/openset/leetcode/blob/master/tag/README.md) > %s\n\n", tag.ShowName()))
128131
buf.WriteString("| # | 题名 | 标签 | 难度 |\n")
129132
buf.WriteString("| :-: | - | - | :-: |\n")
130133
format := "| %s | [%s](https://github.com/openset/leetcode/tree/master/problems/%s)%s | %s | %s |\n"

0 commit comments

Comments
 (0)