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

Method getRef

markdown.go:195–213  ·  view source on GitHub ↗
(refid string)

Source from the content-addressed store, hash-verified

193}
194
195func (p *Markdown) getRef(refid string) (ref *reference, found bool) {
196 if p.referenceOverride != nil {
197 r, overridden := p.referenceOverride(refid)
198 if overridden {
199 if r == nil {
200 return nil, false
201 }
202 return &reference{
203 link: []byte(r.Link),
204 title: []byte(r.Title),
205 noteID: 0,
206 hasBlock: false,
207 text: []byte(r.Text)}, true
208 }
209 }
210 // refs are case insensitive
211 ref, found = p.refs[strings.ToLower(refid)]
212 return ref, found
213}
214
215func (p *Markdown) finalize(block *Node) {
216 above := block.Parent

Callers 1

linkFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected