aboutsummaryrefslogtreecommitdiffhomepage
path: root/markup/goldmark/links/transform.go
diff options
context:
space:
mode:
Diffstat (limited to 'markup/goldmark/links/transform.go')
-rw-r--r--markup/goldmark/links/transform.go16
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
-
})
-
}