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

Method inlineHTMLComment

inline.go:590–607  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

588}
589
590func (p *Markdown) inlineHTMLComment(data []byte) int {
591 if len(data) < 5 {
592 return 0
593 }
594 if data[0] != '<' || data[1] != '!' || data[2] != '-' || data[3] != '-' {
595 return 0
596 }
597 i := 5
598 // scan for an end-of-comment marker, across lines if necessary
599 for i < len(data) && !(data[i-2] == '-' && data[i-1] == '-' && data[i] == '>') {
600 i++
601 }
602 // no end-of-comment marker
603 if i >= len(data) {
604 return 0
605 }
606 return i + 1
607}
608
609func stripMailto(link []byte) []byte {
610 if bytes.HasPrefix(link, []byte("mailto://")) {

Callers 2

htmlCommentMethod · 0.95
leftAngleFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected