Add Markdown render hooks for tables

Fixes #9316
Fixes #12811
This commit is contained in:
Bjørn Erik Pedersen
2024-08-30 10:58:43 +02:00
parent b63f24adc7
commit f738669a4d
13 changed files with 651 additions and 271 deletions

View File

@@ -26,6 +26,7 @@ import (
"github.com/gohugoio/hugo/markup/goldmark/internal/extensions/attributes"
"github.com/gohugoio/hugo/markup/goldmark/internal/render"
"github.com/gohugoio/hugo/markup/goldmark/passthrough"
"github.com/gohugoio/hugo/markup/goldmark/tables"
"github.com/yuin/goldmark/util"
"github.com/yuin/goldmark"
@@ -131,6 +132,7 @@ func newMarkdown(pcfg converter.ProviderConfig) goldmark.Markdown {
if cfg.Extensions.Table {
extensions = append(extensions, extension.Table)
extensions = append(extensions, tables.New())
}
if cfg.Extensions.Strikethrough {