File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 24
24
tagsRegex = regexp .MustCompile ("@tags (.+)" )
25
25
draftRegex = regexp .MustCompile ("@draft (.+)" )
26
26
linkRegex = regexp .MustCompile ("@link (.+)" )
27
+ frontendIdRegex = regexp .MustCompile ("@frontendId (.+)" )
27
28
)
28
29
29
30
var (
@@ -38,6 +39,7 @@ type Meta struct {
38
39
Draft bool
39
40
Fp string
40
41
Link string
42
+ FrontendId string
41
43
}
42
44
43
45
type Metas []* Meta
@@ -92,6 +94,7 @@ func findMeta(content []byte, fp string) *Meta {
92
94
Draft : draft ,
93
95
Fp : filepath .Dir (fp ),
94
96
Link : findTag (content , linkRegex ),
97
+ FrontendId : findTag (content , frontendIdRegex ),
95
98
}
96
99
}
97
100
@@ -179,7 +182,7 @@ var tableStr = `
179
182
180
183
总计: {{ .Total }}
181
184
182
- | 序号 | 难度 | 题目 | 解答 |
183
- | ---- | ---- | ------------------ | ---------------- |{{ range .Metas }}
184
- | {{ .Index }} | {{ .Difficulty }} | [{{ .Title }}]({{ .Link }}) | [{{ .Fp }}](../{{ .Fp }})|{{ end }}
185
+ | 网页序号 | 序号 | 难度 | 题目 | 解答 |
186
+ | ---- | ---- | ---- | ---- -------------- | ---------------- |{{ range .Metas }}
187
+ | {{ .FrontendId }} | {{ . Index }} | {{ .Difficulty }} | [{{ .Title }}]({{ .Link }}) | [{{ .Fp }}](../{{ .Fp }})|{{ end }}
185
188
`
You can’t perform that action at this time.
0 commit comments