Skip to content

Commit

Permalink
Fix table alignment in markdown (#16596) (#16602)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zeripath authored Aug 3, 2021
1 parent a17edf4 commit f912009
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/markup/markdown/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f912009

Please sign in to comment.