diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-12-18 17:41:15 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-12-18 19:51:26 +0100 |
commit | 8adba648cc130a97d2c814c65aa8396044c251fd (patch) | |
tree | 95415853e28ee83e0342cc55944f3bc16d746f4f /markup | |
parent | 6f13430d4a3b0d8b196f13958fbfb6478be1f3aa (diff) | |
download | hugo-8adba648cc130a97d2c814c65aa8396044c251fd.tar.gz hugo-8adba648cc130a97d2c814c65aa8396044c251fd.zip |
all: Remove unused code
Using x/tools/cmd/deadcode
Diffstat (limited to 'markup')
-rw-r--r-- | markup/goldmark/links/transform.go | 16 | ||||
-rw-r--r-- | markup/highlight/highlight.go | 5 |
2 files changed, 0 insertions, 21 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 - }) - } diff --git a/markup/highlight/highlight.go b/markup/highlight/highlight.go index c70659a09..85ea74124 100644 --- a/markup/highlight/highlight.go +++ b/markup/highlight/highlight.go @@ -232,7 +232,6 @@ func highlight(fw hugio.FlexiWriter, code, lang string, attributes []attributes. return `` }, } - } else { wrapper = getPreWrapper(lang, w) } @@ -314,10 +313,6 @@ func (s startEnd) End(code bool) string { return s.end(code) } -func WritePreEnd(w io.Writer) { - fmt.Fprint(w, preEnd) -} - func writeDivStart(w hugio.FlexiWriter, attrs []attributes.Attribute) { w.WriteString(`<div class="highlight`) if attrs != nil { |