Skip to content

Commit f912009

Browse files
authored
Fix table alignment in markdown (#16596) (#16602)
Backport #16596 Set the TableOptions in markdown to allow alignment of the tables to work correctly Fix #15959 Signed-off-by: Andrew Thornton <[email protected]>
1 parent a17edf4 commit f912009

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/markup/markdown/markdown.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ func newParserContext(ctx *markup.RenderContext) parser.Context {
8787
func actualRender(ctx *markup.RenderContext, input io.Reader, output io.Writer) error {
8888
once.Do(func() {
8989
converter = goldmark.New(
90-
goldmark.WithExtensions(extension.Table,
90+
goldmark.WithExtensions(
91+
extension.NewTable(
92+
extension.WithTableCellAlignMethod(extension.TableCellAlignAttribute)),
9193
extension.Strikethrough,
9294
extension.TaskList,
9395
extension.DefinitionList,

0 commit comments

Comments
 (0)