style: reenable switch check
This commit is contained in:
parent
adf4dcdbbf
commit
8322882265
19 changed files with 29 additions and 43 deletions
|
@ -34,8 +34,7 @@ func (g *GitHubCalloutTransformer) Transform(node *ast.Document, reader text.Rea
|
|||
return ast.WalkContinue, nil
|
||||
}
|
||||
|
||||
switch v := n.(type) {
|
||||
case *ast.Blockquote:
|
||||
if v, ok := n.(*ast.Blockquote); ok {
|
||||
if v.ChildCount() == 0 {
|
||||
return ast.WalkContinue, nil
|
||||
}
|
||||
|
@ -91,7 +90,6 @@ func (g *GitHubCalloutTransformer) Transform(node *ast.Document, reader text.Rea
|
|||
firstParagraph.Parent().InsertBefore(firstParagraph.Parent(), firstParagraph, attentionParagraph)
|
||||
firstParagraph.RemoveChild(firstParagraph, firstTextNode)
|
||||
firstParagraph.RemoveChild(firstParagraph, secondTextNode)
|
||||
firstParagraph.RemoveChild(firstParagraph, thirdTextNode)
|
||||
}
|
||||
return ast.WalkContinue, nil
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue