mirror of
https://github.com/danog/blackfriday.git
synced 2024-12-02 17:38:07 +01:00
Add String() method to reference struct
This commit is contained in:
parent
9e68ff937b
commit
c29209fcda
@ -20,6 +20,7 @@ package blackfriday
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
)
|
)
|
||||||
@ -516,6 +517,11 @@ type reference struct {
|
|||||||
text []byte
|
text []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *reference) String() string {
|
||||||
|
return fmt.Sprintf("{link: %q, title: %q, text: %q, noteId: %d, hasBlock: %v}",
|
||||||
|
r.link, r.title, r.text, r.noteId, r.hasBlock)
|
||||||
|
}
|
||||||
|
|
||||||
// Check whether or not data starts with a reference link.
|
// Check whether or not data starts with a reference link.
|
||||||
// If so, it is parsed and stored in the list of references
|
// If so, it is parsed and stored in the list of references
|
||||||
// (in the render struct).
|
// (in the render struct).
|
||||||
|
Loading…
Reference in New Issue
Block a user