summaryrefslogtreecommitdiffstats
path: root/markup/goldmark
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-01-28 22:34:10 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-01-28 23:14:09 +0100
commita795acbcd8b18aa4af384d5c03f30740361c8fcf (patch)
tree0dbf7b000681a738b892c5235daf52c63cda88b9 /markup/goldmark
parent982d9513e71b3d48e20cfa38454a0e1215a8d963 (diff)
all: Run gofumpt -l -w .
Diffstat (limited to 'markup/goldmark')
-rw-r--r--markup/goldmark/images/transform.go2
-rw-r--r--markup/goldmark/internal/extensions/attributes/attributes.go4
2 files changed, 2 insertions, 4 deletions
diff --git a/markup/goldmark/images/transform.go b/markup/goldmark/images/transform.go
index 4eb793ae1..2e97a6791 100644
--- a/markup/goldmark/images/transform.go
+++ b/markup/goldmark/images/transform.go
@@ -71,7 +71,5 @@ func (t *Transformer) Transform(doc *ast.Document, reader text.Reader, pctx pars
}
return ast.WalkContinue, nil
-
})
-
}
diff --git a/markup/goldmark/internal/extensions/attributes/attributes.go b/markup/goldmark/internal/extensions/attributes/attributes.go
index 60ae609ec..feb3d915b 100644
--- a/markup/goldmark/internal/extensions/attributes/attributes.go
+++ b/markup/goldmark/internal/extensions/attributes/attributes.go
@@ -56,7 +56,7 @@ func (a *attrParser) Continue(node ast.Node, reader text.Reader, pc parser.Conte
func (a *attrParser) Open(parent ast.Node, reader text.Reader, pc parser.Context) (ast.Node, parser.State) {
if attrs, ok := parser.ParseAttributes(reader); ok {
// add attributes
- var node = &attributesBlock{
+ node := &attributesBlock{
BaseBlock: ast.BaseBlock{},
}
for _, attr := range attrs {
@@ -95,7 +95,7 @@ func (a *attributesBlock) Kind() ast.NodeKind {
type transformer struct{}
func (a *transformer) Transform(node *ast.Document, reader text.Reader, pc parser.Context) {
- var attributes = make([]ast.Node, 0, 500)
+ attributes := make([]ast.Node, 0, 500)
ast.Walk(node, func(node ast.Node, entering bool) (ast.WalkStatus, error) {
if entering && node.Kind() == kindAttributesBlock {
// Attributes for fenced code blocks are handled in their own extension,