File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 2424 tagsRegex = regexp .MustCompile ("@tags (.+)" )
2525 draftRegex = regexp .MustCompile ("@draft (.+)" )
2626 linkRegex = regexp .MustCompile ("@link (.+)" )
27+ frontendIdRegex = regexp .MustCompile ("@frontendId (.+)" )
2728)
2829
2930var (
@@ -38,6 +39,7 @@ type Meta struct {
3839 Draft bool
3940 Fp string
4041 Link string
42+ FrontendId string
4143}
4244
4345type Metas []* Meta
@@ -92,6 +94,7 @@ func findMeta(content []byte, fp string) *Meta {
9294 Draft : draft ,
9395 Fp : filepath .Dir (fp ),
9496 Link : findTag (content , linkRegex ),
97+ FrontendId : findTag (content , frontendIdRegex ),
9598 }
9699}
97100
@@ -179,7 +182,7 @@ var tableStr = `
179182
180183总计: {{ .Total }}
181184
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 }}
185188`
You can’t perform that action at this time.
0 commit comments