'<' when tags or autolinks are allowed
(p *Markdown, data []byte, offset int)
| 628 | |
| 629 | // '<' when tags or autolinks are allowed |
| 630 | func leftAngle(p *Markdown, data []byte, offset int) (int, *Node) { |
| 631 | data = data[offset:] |
| 632 | altype, end := tagLength(data) |
| 633 | if size := p.inlineHTMLComment(data); size > 0 { |
| 634 | end = size |
| 635 | } |
| 636 | if end > 2 { |
| 637 | if altype != notAutolink { |
| 638 | var uLink bytes.Buffer |
| 639 | unescapeText(&uLink, data[1:end+1-2]) |
| 640 | if uLink.Len() > 0 { |
| 641 | link := uLink.Bytes() |
| 642 | node := NewNode(Link) |
| 643 | node.Destination = link |
| 644 | if altype == emailAutolink { |
| 645 | node.Destination = append([]byte("mailto:"), link...) |
| 646 | } |
| 647 | node.AppendChild(text(stripMailto(link))) |
| 648 | return end, node |
| 649 | } |
| 650 | } else { |
| 651 | htmlTag := NewNode(HTMLSpan) |
| 652 | htmlTag.Literal = data[:end] |
| 653 | return end, htmlTag |
| 654 | } |
| 655 | } |
| 656 | |
| 657 | return end, nil |
| 658 | } |
| 659 | |
| 660 | // '\\' backslash escape |
| 661 | var escapeChars = []byte("\\`*_{}[]()#+-.!:|&<>~") |
nothing calls this directly
no test coverage detected
searching dependent graphs…