1
0
mirror of https://github.com/danog/blackfriday.git synced 2024-11-26 20:14:43 +01:00

Simplify return value

This commit is contained in:
Vytautas Šaltenis 2015-10-28 21:21:51 +02:00
parent 4b26653fe0
commit d4ee3ea08b

View File

@ -661,10 +661,7 @@ func entity(p *parser, out *bytes.Buffer, data []byte, offset int) int {
func linkEndsWithEntity(data []byte, linkEnd int) bool {
entityRanges := htmlEntity.FindAllIndex(data[:linkEnd], -1)
if entityRanges != nil && entityRanges[len(entityRanges)-1][1] == linkEnd {
return true
}
return false
return entityRanges != nil && entityRanges[len(entityRanges)-1][1] == linkEnd
}
func autoLink(p *parser, out *bytes.Buffer, data []byte, offset int) int {