Skip to content

Commit 5df8cbf

Browse files
committed
fix:markdown table rows,fix multiple folder chache bug
1 parent deb1104 commit 5df8cbf

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

notion-site.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
#notion:
2-
# databaseId: 2bd00e5dfff3449ba81e0142f8af9bbb
3-
# filterProp: Status
4-
# filterValue:
5-
# - Finished
6-
# - Published
7-
# - RePublish
8-
# publishedValue: Published
9-
#markdown:
10-
# homePath: ../notion-site-doc
11-
12-
13-
#blog
141
notion:
15-
databaseId: df7fb0e4e0114268b973f9d3e9a39982
2+
databaseId: 2bd00e5dfff3449ba81e0142f8af9bbb
163
filterProp: Status
174
filterValue:
185
- Finished
196
- Published
207
- RePublish
218
publishedValue: Published
229
markdown:
23-
homePath: ../notion-hugo-website-builder
10+
homePath: ../notion-site-doc
11+
12+
13+
#blog
14+
#notion:
15+
# databaseId: df7fb0e4e0114268b973f9d3e9a39982
16+
# filterProp: Status
17+
# filterValue:
18+
# - Finished
19+
# - Published
20+
# - RePublish
21+
# publishedValue: Published
22+
#markdown:
23+
# homePath: ../notion-hugo-website-builder

pkg/generator.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ func Run(ns *NotionSite) error {
3434
if err := processDatabase(ns, cache.ChildDatabaseId); err != nil {
3535
fmt.Errorf("process child database erro but continu %s", err)
3636
}
37-
// del
38-
ns.caches = append(ns.caches[:0], ns.caches[1:]...)
3937
}
4038
// Set GITHUB_ACTIONS info variables : https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions
4139
if os.Getenv("GITHUB_ACTIONS") == "true" {

pkg/markdown.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,14 +390,16 @@ func ConvertRow(r *notion.TableRowBlock, fmt string) string {
390390
if i == 0 {
391391
rowMd += "|"
392392
}
393+
var a = ""
393394
for _, rich := range cell {
394-
a := ConvertRich(rich)
395-
if fmt != "" {
396-
a = fmt
397-
}
398-
rowMd += " " + a + " |"
395+
a += ConvertRich(rich)
399396

400397
}
398+
if fmt != "" {
399+
a = fmt
400+
}
401+
rowMd += " " + a + " |"
402+
401403
if i == len(r.Cells)-1 {
402404
rowMd += "\n"
403405
}

0 commit comments

Comments
 (0)