summaryrefslogtreecommitdiff
path: root/vendor/github.com/yuin/goldmark/ast
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-10-14 11:43:44 +0200
committerLibravatar GitHub <noreply@github.com>2024-10-14 11:43:44 +0200
commitbe3b8076ca1deab9c60c61fcc8599f5d48e92e52 (patch)
tree718fc676925d8e8a9250f38d4b8b6eda0653121b /vendor/github.com/yuin/goldmark/ast
parent[chore] Clarify supported platforms, add notes + docs (#3427) (diff)
downloadgotosocial-be3b8076ca1deab9c60c61fcc8599f5d48e92e52.tar.xz
[chore]: Bump github.com/yuin/goldmark from 1.7.4 to 1.7.6 (#3430)
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.7.4 to 1.7.6. - [Release notes](https://github.com/yuin/goldmark/releases) - [Commits](https://github.com/yuin/goldmark/compare/v1.7.4...v1.7.6) --- updated-dependencies: - dependency-name: github.com/yuin/goldmark dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/yuin/goldmark/ast')
-rw-r--r--vendor/github.com/yuin/goldmark/ast/block.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/yuin/goldmark/ast/block.go b/vendor/github.com/yuin/goldmark/ast/block.go
index c5d4738e6..04d0d5443 100644
--- a/vendor/github.com/yuin/goldmark/ast/block.go
+++ b/vendor/github.com/yuin/goldmark/ast/block.go
@@ -1,6 +1,7 @@
package ast
import (
+ "bytes"
"fmt"
"strings"
@@ -47,6 +48,15 @@ func (b *BaseBlock) SetLines(v *textm.Segments) {
b.lines = v
}
+// Text implements Node.Text.
+func (b *BaseBlock) Text(source []byte) []byte {
+ var buf bytes.Buffer
+ for _, line := range b.Lines().Sliced(0, b.Lines().Len()) {
+ buf.Write(line.Value(source))
+ }
+ return buf.Bytes()
+}
+
// A Document struct is a root node of Markdown text.
type Document struct {
BaseBlock