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/figure.go | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 vendor/github.com/mangoumbrella/goldmark-figure/figure.go (limited to 'vendor/github.com/mangoumbrella/goldmark-figure/figure.go') diff --git a/vendor/github.com/mangoumbrella/goldmark-figure/figure.go b/vendor/github.com/mangoumbrella/goldmark-figure/figure.go new file mode 100644 index 0000000..00ec574 --- /dev/null +++ b/vendor/github.com/mangoumbrella/goldmark-figure/figure.go @@ -0,0 +1,36 @@ +// Copyright 2023 The goldmark-figure authors +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. +package figure + +import ( + "github.com/mangoumbrella/goldmark-figure/ast" + "github.com/yuin/goldmark" + aparser "github.com/yuin/goldmark/parser" + "github.com/yuin/goldmark/renderer" + "github.com/yuin/goldmark/util" + + fparser "github.com/mangoumbrella/goldmark-figure/parser" +) + +type extension struct { +} + +// Figure is an extension to render
elements. +var Figure = &extension{} + +func (f *extension) Extend(m goldmark.Markdown) { + m.Parser().AddOptions( + aparser.WithParagraphTransformers( + util.Prioritized(fparser.NewFigureParagraphTransformer(), 120), + ), + aparser.WithASTTransformers( + util.Prioritized(fparser.NewFigureASTTransformer(), 0), + ), + ) + m.Renderer().AddOptions(renderer.WithNodeRenderers( + util.Prioritized(ast.NewFigureHTMLRenderer(), 0), + )) +} -- cgit v1.2.3