@@ -21,9 +21,9 @@ func runReadme(cmd *base.Command, args []string) {
21
21
if len (args ) != 0 {
22
22
cmd .Usage ()
23
23
}
24
- wb := bytes .NewBuffer ( nil )
24
+ var wb bytes.Buffer
25
25
wb .WriteString (defaultStr )
26
- writeProblems (wb )
26
+ writeProblems (& wb )
27
27
err := ioutil .WriteFile ("README.md" , wb .Bytes (), 0644 )
28
28
base .CheckErr (err )
29
29
}
@@ -37,8 +37,8 @@ func writeProblems(wb *bytes.Buffer) {
37
37
title := strings .TrimSpace (problem .Stat .QuestionTitle )
38
38
slug := problem .Stat .QuestionTitleSlug
39
39
levelName := problem .Difficulty .LevelName ()
40
- format := "| %d | [%s](https://leetcode.com/problems/%s) | [Go](https://github.com/openset/leetcode/tree/master/solution/%s) | %s |\n "
41
- problemsSet [id ] = fmt .Sprintf (format , id , title , slug , slug , levelName )
40
+ format := "| <span id= \" %d \" >%d</span> | [%s](https://leetcode.com/problems/%s) | [Go](https://github.com/openset/leetcode/tree/master/solution/%s) | %s |\n "
41
+ problemsSet [id ] = fmt .Sprintf (format , id , id , title , slug , slug , levelName )
42
42
if id > maxId {
43
43
maxId = id
44
44
}
0 commit comments