diff options
author | Wim <wim@42.be> | 2023-08-05 20:43:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-05 20:43:19 +0200 |
commit | 56e7bd01ca09ad52b0c4f48f146a20a4f1b78696 (patch) | |
tree | b1355645342667209263cbd355dc0b4254f1e8fe /vendor/github.com/gomarkdown/markdown/parser/caption.go | |
parent | 9459495484d6e06a3d46de64fccd8d06f7ccc72c (diff) | |
download | matterbridge-msglm-master.tar.gz matterbridge-msglm-master.tar.bz2 matterbridge-msglm-master.zip |
Diffstat (limited to 'vendor/github.com/gomarkdown/markdown/parser/caption.go')
-rw-r--r-- | vendor/github.com/gomarkdown/markdown/parser/caption.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/gomarkdown/markdown/parser/caption.go b/vendor/github.com/gomarkdown/markdown/parser/caption.go index fe31711a..08794504 100644 --- a/vendor/github.com/gomarkdown/markdown/parser/caption.go +++ b/vendor/github.com/gomarkdown/markdown/parser/caption.go @@ -11,7 +11,7 @@ func (p *Parser) caption(data, caption []byte) ([]byte, string, int) { } j := len(caption) data = data[j:] - end := p.linesUntilEmpty(data) + end := LinesUntilEmpty(data) data = data[:end] @@ -23,8 +23,8 @@ func (p *Parser) caption(data, caption []byte) ([]byte, string, int) { return data, "", end + j } -// linesUntilEmpty scans lines up to the first empty line. -func (p *Parser) linesUntilEmpty(data []byte) int { +// LinesUntilEmpty scans lines up to the first empty line. +func LinesUntilEmpty(data []byte) int { line, i := 0, 0 for line < len(data) { @@ -35,7 +35,7 @@ func (p *Parser) linesUntilEmpty(data []byte) int { i++ } - if p.isEmpty(data[line:i]) == 0 { + if IsEmpty(data[line:i]) == 0 { line = i continue } |