Skip to content

Commit 8cde692

Browse files
author
openset
committed
Update: linkStr
1 parent 01433e8 commit 8cde692

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Diff for: internal/readme/readme.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ func writeNav(buf *bytes.Buffer) {
101101
func linkStr(num int) string {
102102
link := "https://github.com/openset/leetcode/blob/master/"
103103
if num > maxID-maxID%pageSize-pageSize {
104-
link += fmt.Sprintf("README.md#%d", num)
105-
} else {
106-
link += fmt.Sprintf("readme/%d-%d.md#%d", (num-1)/pageSize*pageSize+1, ((num-1)/pageSize+1)*pageSize, num-step+1)
104+
return fmt.Sprintf("%sREADME.md#%d", link, num)
107105
}
108-
return link
106+
return fmt.Sprintf("%sreadme/%d-%d.md#%d", link, (num-1)/pageSize*pageSize+1, ((num-1)/pageSize+1)*pageSize, num-step+1)
109107
}

0 commit comments

Comments
 (0)