diff options
author | zeripath <art27@cantab.net> | 2021-08-04 00:16:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-04 00:16:00 +0100 |
commit | f9120092c164f7d1d25792a76fb39601ac02c681 (patch) | |
tree | c5a85b876ea99f576a2ee2975c5d0b2df59c2046 | |
parent | a17edf446ff6d3d75847eb0c871e17fdbade69b6 (diff) | |
download | gitea-f9120092c164f7d1d25792a76fb39601ac02c681.tar.gz gitea-f9120092c164f7d1d25792a76fb39601ac02c681.zip |
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 <art27@cantab.net>
-rw-r--r-- | modules/markup/markdown/markdown.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go index cac2a180fa..ab026dd1b8 100644 --- a/modules/markup/markdown/markdown.go +++ b/modules/markup/markdown/markdown.go @@ -87,7 +87,9 @@ func newParserContext(ctx *markup.RenderContext) parser.Context { func actualRender(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { once.Do(func() { converter = goldmark.New( - goldmark.WithExtensions(extension.Table, + goldmark.WithExtensions( + extension.NewTable( + extension.WithTableCellAlignMethod(extension.TableCellAlignAttribute)), extension.Strikethrough, extension.TaskList, extension.DefinitionList, |