MCPcopy
hub / github.com/russross/blackfriday / isEmpty

Method isEmpty

block.go:522–538  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

520}
521
522func (*Markdown) isEmpty(data []byte) int {
523 // it is okay to call isEmpty on an empty buffer
524 if len(data) == 0 {
525 return 0
526 }
527
528 var i int
529 for i = 0; i < len(data) && data[i] != '\n'; i++ {
530 if data[i] != ' ' && data[i] != '\t' {
531 return 0
532 }
533 }
534 if i < len(data) && data[i] == '\n' {
535 i++
536 }
537 return i
538}
539
540func (*Markdown) isHRule(data []byte) bool {
541 i := 0

Callers 9

blockMethod · 0.95
htmlCommentMethod · 0.95
htmlHrMethod · 0.95
htmlFindEndMethod · 0.95
terminateBlockquoteMethod · 0.95
codeMethod · 0.95
listItemMethod · 0.95
paragraphMethod · 0.95
scanFootnoteFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected