all: Remove unused code

Using x/tools/cmd/deadcode
This commit is contained in:
Bjørn Erik Pedersen
2023-12-18 17:41:15 +01:00
parent 6f13430d4a
commit 8adba648cc
30 changed files with 32 additions and 405 deletions

View File

@@ -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
})
}

View File

@@ -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 {