From c6cc0108ca7738023b45e0eeac0fa2390532dd93 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 25 Oct 2024 00:47:47 +0200 Subject: Added vendor lock on deps --- .../mangoumbrella/goldmark-figure/README.md | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 vendor/github.com/mangoumbrella/goldmark-figure/README.md (limited to 'vendor/github.com/mangoumbrella/goldmark-figure/README.md') diff --git a/vendor/github.com/mangoumbrella/goldmark-figure/README.md b/vendor/github.com/mangoumbrella/goldmark-figure/README.md new file mode 100644 index 0000000..22ad7a4 --- /dev/null +++ b/vendor/github.com/mangoumbrella/goldmark-figure/README.md @@ -0,0 +1,72 @@ +# goldmark-figure + +[![goldmark-figure Go reference](https://pkg.go.dev/badge/github.com/mangoumbrella/goldmark-figure.svg)](https://pkg.go.dev/github.com/mangoumbrella/goldmark-figure) +[![goldmark-figure test results](https://github.com/mangoumbrella/goldmark-figure/actions/workflows/test.yml/badge.svg?event=push)](https://github.com/mangoumbrella/goldmark-figure/actions/workflows/test.yml/badge.svg?event=push) +[![goldmark-figure Go report card](https://goreportcard.com/badge/github.com/mangoumbrella/goldmark-figure)](https://goreportcard.com/report/github.com/mangoumbrella/goldmark-figure) + +[goldmark-figure](https://github.com/MangoUmbrella/goldmark-figure) is a +[goldmark](http://github.com/yuin/goldmark) +extension to parse mardown paragraphs that start with an image into HTML +`
` elements. One nice thing is it doesn't use any new markdown +syntaxes. + +Example markdown source: + +```md +![Picture of Oscar.](/path/to/cat.jpg) +Awesome caption about **Oscar** the kitty. +``` + +Render result: + +```html +
+ Picture of Oscar. +
Awesome caption about Oscar the kitty.
+
+``` + +# Installation + +``` +go get github.com/mangoumbrella/goldmark-figure +``` + +# Usage + +```go +import ( + "bytes" + "fmt" + + "github.com/mangoumbrella/goldmark-figure" + "github.com/yuin/goldmark" +) + +func main() { + markdown := goldmark.New( + goldmark.WithExtensions( + figure.Figure, + ), + ) + source := ` + ![Picture of Oscar.](/path/to/cat.jpg) + Awesome caption about **Oscar** the kitty. + ` + var buf bytes.Buffer + if err := markdown.Convert([]byte(source), &buf); err != nil { + panic(err) + } + fmt.Print(buf.String()) +} +``` + +See [`figure_test.go`](/figure_test.go) for detailed usages. + +# LICENSE + +MIT + +# Authors + +Yilei Yang -- cgit v1.2.3