mirror of
https://github.com/danog/blackfriday.git
synced 2024-11-30 04:29:13 +01:00
Drop misleading comment and turn func into method
* The comment is no longer true. * Other functions similar to terminateBlockquote() are methods, so make this one a method too.
This commit is contained in:
parent
6c330778b2
commit
4193e8665a
4
block.go
4
block.go
@ -893,7 +893,7 @@ func (p *parser) quotePrefix(data []byte) int {
|
||||
|
||||
// blockquote ends with at least one blank line
|
||||
// followed by something without a blockquote prefix
|
||||
func terminateBlockquote(p *parser, data []byte, beg, end int) bool {
|
||||
func (p *parser) terminateBlockquote(data []byte, beg, end int) bool {
|
||||
if p.isEmpty(data[beg:]) <= 0 {
|
||||
return false
|
||||
}
|
||||
@ -927,7 +927,7 @@ func (p *parser) quote(out *bytes.Buffer, data []byte) int {
|
||||
if pre := p.quotePrefix(data[beg:]); pre > 0 {
|
||||
// skip the prefix
|
||||
beg += pre
|
||||
} else if terminateBlockquote(p, data, beg, end) {
|
||||
} else if p.terminateBlockquote(data, beg, end) {
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -385,7 +385,6 @@ func MarkdownOptions(input []byte, renderer Renderer, opts Options) []byte {
|
||||
// - expand tabs
|
||||
// - normalize newlines
|
||||
// - copy everything else
|
||||
// - add missing newlines before fenced code blocks
|
||||
func firstPass(p *parser, input []byte) []byte {
|
||||
var out bytes.Buffer
|
||||
tabSize := TAB_SIZE_DEFAULT
|
||||
|
Loading…
Reference in New Issue
Block a user