From 483debe717ea2fe3e7577957b1348b581043a797 Mon Sep 17 00:00:00 2001 From: geekifan Date: Mon, 28 Apr 2025 21:55:12 +0800 Subject: [PATCH] use table render hook instead of refactor --- layouts/_default/_markup/render-table.html | 39 ++++++++++++++++++++++ layouts/partials/refactor-content.html | 8 ----- 2 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 layouts/_default/_markup/render-table.html diff --git a/layouts/_default/_markup/render-table.html b/layouts/_default/_markup/render-table.html new file mode 100644 index 0000000..cc6046a --- /dev/null +++ b/layouts/_default/_markup/render-table.html @@ -0,0 +1,39 @@ +
+ + + {{- range .THead }} + + {{- range . }} + + {{- end }} + + {{- end }} + + + {{- range .TBody }} + + {{- range . }} + + {{- end }} + + {{- end }} + +
+ {{- .Text -}} +
+ {{- .Text -}} +
+
diff --git a/layouts/partials/refactor-content.html b/layouts/partials/refactor-content.html index dc78881..8d7dda4 100644 --- a/layouts/partials/refactor-content.html +++ b/layouts/partials/refactor-content.html @@ -1,13 +1,5 @@ {{ $content := .Content }} - -{{ if findRE `` `` }} - {{ $content = replace $content `
` `` }} - {{ $content = replace $content `
` `
` }} -{{ end }} - {{ if findRE `