aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-08-02 17:11:18 +0100
committerGitHub <noreply@github.com>2021-08-02 17:11:18 +0100
commit1fc7d6d6ad2fe85a28aff6dd14e41da8ee769f31 (patch)
tree6db0e981ce17175eaea40d26b585275da6fb7b6b /modules
parent24366eddec0915d92165f1a45c01ed2a5bdeac8e (diff)
downloadgitea-1fc7d6d6ad2fe85a28aff6dd14e41da8ee769f31.tar.gz
gitea-1fc7d6d6ad2fe85a28aff6dd14e41da8ee769f31.zip
Fix table alignment in markdown (#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>
Diffstat (limited to 'modules')
-rw-r--r--modules/markup/markdown/markdown.go4
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,