mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-23 00:24:17 +02:00
Remove redundant else
This commit is contained in:
parent
f6dd895862
commit
1642207b78
1 changed files with 10 additions and 12 deletions
22
gold.go
22
gold.go
|
|
@ -115,12 +115,11 @@ func NewElement(node *bf.Node) Element {
|
|||
Pre: "\n",
|
||||
Post: "\n\n",
|
||||
}
|
||||
} else {
|
||||
return Element{
|
||||
Token: string(node.Literal),
|
||||
Pre: "\n",
|
||||
Post: "\n",
|
||||
}
|
||||
}
|
||||
return Element{
|
||||
Token: string(node.Literal),
|
||||
Pre: "\n",
|
||||
Post: "\n",
|
||||
}
|
||||
case bf.Heading:
|
||||
return Element{
|
||||
|
|
@ -171,12 +170,11 @@ func NewElement(node *bf.Node) Element {
|
|||
Pre: "",
|
||||
Post: "",
|
||||
}
|
||||
} else {
|
||||
return Element{
|
||||
Token: "",
|
||||
Pre: "",
|
||||
Post: "",
|
||||
}
|
||||
}
|
||||
return Element{
|
||||
Token: "",
|
||||
Pre: "",
|
||||
Post: "",
|
||||
}
|
||||
case bf.HTMLBlock:
|
||||
return Element{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue