mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
♻️ Simplify logic
This commit is contained in:
parent
0c44174564
commit
008c258471
1 changed files with 2 additions and 3 deletions
|
|
@ -79,10 +79,9 @@ func ReadWhile(source []byte, index [2]int, pred func(byte) bool) (int, bool) {
|
||||||
// IsBlank returns true if the given string is all space characters.
|
// IsBlank returns true if the given string is all space characters.
|
||||||
func IsBlank(bs []byte) bool {
|
func IsBlank(bs []byte) bool {
|
||||||
for _, b := range bs {
|
for _, b := range bs {
|
||||||
if IsSpace(b) {
|
if !IsSpace(b) {
|
||||||
continue
|
return false
|
||||||
}
|
}
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue