mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
🎨 Remove redundant slice assignment
This commit is contained in:
parent
6f6884271d
commit
0c44174564
1 changed files with 0 additions and 12 deletions
|
|
@ -116,24 +116,12 @@ func (b *tableParagraphTransformer) parseDelimiter(segment text.Segment, reader
|
|||
var alignments []ast.Alignment
|
||||
for _, col := range cols {
|
||||
if tableDelimLeft.Match(col) {
|
||||
if alignments == nil {
|
||||
alignments = []ast.Alignment{}
|
||||
}
|
||||
alignments = append(alignments, ast.AlignLeft)
|
||||
} else if tableDelimRight.Match(col) {
|
||||
if alignments == nil {
|
||||
alignments = []ast.Alignment{}
|
||||
}
|
||||
alignments = append(alignments, ast.AlignRight)
|
||||
} else if tableDelimCenter.Match(col) {
|
||||
if alignments == nil {
|
||||
alignments = []ast.Alignment{}
|
||||
}
|
||||
alignments = append(alignments, ast.AlignCenter)
|
||||
} else if tableDelimNone.Match(col) {
|
||||
if alignments == nil {
|
||||
alignments = []ast.Alignment{}
|
||||
}
|
||||
alignments = append(alignments, ast.AlignNone)
|
||||
} else {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue