From 15733cddb22de81475d1934be100cd3960668c43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 12:04:27 +0100 Subject: [chore]: Bump github.com/yuin/goldmark from 1.7.0 to 1.7.1 (#2819) Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.7.0 to 1.7.1. - [Release notes](https://github.com/yuin/goldmark/releases) - [Commits](https://github.com/yuin/goldmark/compare/v1.7.0...v1.7.1) --- updated-dependencies: - dependency-name: github.com/yuin/goldmark dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- vendor/github.com/yuin/goldmark/README.md | 5 ++++- vendor/github.com/yuin/goldmark/renderer/html/html.go | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'vendor/github.com') diff --git a/vendor/github.com/yuin/goldmark/README.md b/vendor/github.com/yuin/goldmark/README.md index a83644540..286ef3c16 100644 --- a/vendor/github.com/yuin/goldmark/README.md +++ b/vendor/github.com/yuin/goldmark/README.md @@ -10,6 +10,8 @@ goldmark goldmark is compliant with CommonMark 0.31.2. +- [goldmark playground](https://yuin.github.io/goldmark/playground/) : Try goldmark online. This playground is built with WASM(5-10MB). + Motivation ---------------------- I needed a Markdown parser for Go that satisfies the following requirements: @@ -282,7 +284,7 @@ markdown := goldmark.New( "https:", }), extension.WithLinkifyURLRegexp( - xurls.Strict, + xurls.Strict(), ), ), ), @@ -493,6 +495,7 @@ Extensions - [goldmark-img64](https://github.com/tenkoh/goldmark-img64): Adds support for embedding images into the document as DataURL (base64 encoded). - [goldmark-enclave](https://github.com/quail-ink/goldmark-enclave): Adds support for embedding youtube/bilibili video, X's [oembed tweet](https://publish.twitter.com/), [tradingview](https://www.tradingview.com/widget/)'s chart, [quail](https://quail.ink)'s widget into the document. - [goldmark-wiki-table](https://github.com/movsb/goldmark-wiki-table): Adds support for embedding Wiki Tables. +- [goldmark-tgmd](https://github.com/Mad-Pixels/goldmark-tgmd): A Telegram markdown renderer that can be passed to `goldmark.WithRenderer()`. ### Loading extensions at runtime [goldmark-dynamic](https://github.com/yuin/goldmark-dynamic) allows you to write a goldmark extension in Lua and load it at runtime without re-compilation. diff --git a/vendor/github.com/yuin/goldmark/renderer/html/html.go b/vendor/github.com/yuin/goldmark/renderer/html/html.go index 8738c2a1b..75ac6dbfa 100644 --- a/vendor/github.com/yuin/goldmark/renderer/html/html.go +++ b/vendor/github.com/yuin/goldmark/renderer/html/html.go @@ -786,7 +786,14 @@ func RenderAttributes(w util.BufWriter, node ast.Node, filter util.BytesFilter) _, _ = w.Write(attr.Name) _, _ = w.WriteString(`="`) // TODO: convert numeric values to strings - _, _ = w.Write(util.EscapeHTML(attr.Value.([]byte))) + var value []byte + switch typed := attr.Value.(type) { + case []byte: + value = typed + case string: + value = util.StringToReadOnlyBytes(typed) + } + _, _ = w.Write(util.EscapeHTML(value)) _ = w.WriteByte('"') } } -- cgit v1.2.3