1
0
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:
Vytautas Šaltenis 2015-11-01 09:32:30 +02:00
parent 6c330778b2
commit 4193e8665a
2 changed files with 2 additions and 3 deletions

View File

@ -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
}

View File

@ -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