diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-12-18 17:41:15 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-12-18 19:51:26 +0100 |
commit | 8adba648cc130a97d2c814c65aa8396044c251fd (patch) | |
tree | 95415853e28ee83e0342cc55944f3bc16d746f4f /markup/goldmark | |
parent | 6f13430d4a3b0d8b196f13958fbfb6478be1f3aa (diff) |
all: Remove unused code
Using x/tools/cmd/deadcode
Diffstat (limited to 'markup/goldmark')
-rw-r--r-- | markup/goldmark/links/transform.go | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/markup/goldmark/links/transform.go b/markup/goldmark/links/transform.go index b4f6b6dc5..2a7815b70 100644 --- a/markup/goldmark/links/transform.go +++ b/markup/goldmark/links/transform.go @@ -1,11 +1,9 @@ package images import ( - "github.com/yuin/goldmark" "github.com/yuin/goldmark/ast" "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/text" - "github.com/yuin/goldmark/util" ) type ( @@ -20,18 +18,6 @@ const ( AttrIsBlock = "_h__isBlock" ) -func New(wrapStandAloneImageWithinParagraph bool) goldmark.Extender { - return &linksExtension{wrapStandAloneImageWithinParagraph: wrapStandAloneImageWithinParagraph} -} - -func (e *linksExtension) Extend(m goldmark.Markdown) { - m.Parser().AddOptions( - parser.WithASTTransformers( - util.Prioritized(&Transformer{wrapStandAloneImageWithinParagraph: e.wrapStandAloneImageWithinParagraph}, 300), - ), - ) -} - type Transformer struct { wrapStandAloneImageWithinParagraph bool } @@ -67,7 +53,5 @@ func (t *Transformer) Transform(doc *ast.Document, reader text.Reader, pctx pars } return ast.WalkContinue, nil - }) - } |