mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
♻️ Remove redundant check
This commit is contained in:
parent
008c258471
commit
e7035b1993
1 changed files with 2 additions and 4 deletions
|
|
@ -48,10 +48,8 @@ func (b *tableParagraphTransformer) Transform(node *gast.Paragraph, reader text.
|
|||
table := ast.NewTable()
|
||||
table.Alignments = alignments
|
||||
table.AppendChild(table, ast.NewTableHeader(header))
|
||||
if lines.Len() > 2 {
|
||||
for i := 2; i < lines.Len(); i++ {
|
||||
table.AppendChild(table, b.parseRow(lines.At(i), alignments, false, reader))
|
||||
}
|
||||
for i := 2; i < lines.Len(); i++ {
|
||||
table.AppendChild(table, b.parseRow(lines.At(i), alignments, false, reader))
|
||||
}
|
||||
node.Parent().InsertBefore(node.Parent(), node, table)
|
||||
node.Parent().RemoveChild(node.Parent(), node)
|
||||
|
|
|
|||
Loading…
Reference in a new issue