Skip to content

Commit cf09904

Browse files
committed
tidy, gofmt, and imports
Signed-off-by: Miek Gieben <[email protected]>
1 parent 47f0d19 commit cf09904

File tree

16 files changed

+29
-47
lines changed

16 files changed

+29
-47
lines changed

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
22
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
3-
github.com/gomarkdown/markdown v0.0.0-20220825072242-90efaac57fb4 h1:YOfiTywt9f60GzIFrnor09U0Q3PySmqnyIqvK0o6fzI=
4-
github.com/gomarkdown/markdown v0.0.0-20220825072242-90efaac57fb4/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=
53
github.com/gomarkdown/markdown v0.0.0-20220830015526-01a3c37d6f50 h1:tSuUky4sFWjiIIEOefDDBjx5BUIT3kZwcXHM2CNDdTk=
64
github.com/gomarkdown/markdown v0.0.0-20220830015526-01a3c37d6f50/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=
75
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=

mast/authors.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package mast
22

3-
import (
4-
"github.com/gomarkdown/markdown/ast"
5-
)
3+
import "github.com/gomarkdown/markdown/ast"
64

75
// Authors represents markdown authors section node.
86
type Authors struct {

mast/bibliography.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package mast
22

33
import (
4-
"github.com/mmarkdown/mmark/v2/mast/reference"
5-
64
"github.com/gomarkdown/markdown/ast"
5+
"github.com/mmarkdown/mmark/v2/mast/reference"
76
)
87

98
// Bibliography represents markdown bibliography node.

mmark.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@ import (
77
"log"
88
"os"
99

10+
"github.com/gomarkdown/markdown"
11+
"github.com/gomarkdown/markdown/ast"
12+
"github.com/gomarkdown/markdown/html"
13+
"github.com/gomarkdown/markdown/parser"
1014
"github.com/mmarkdown/mmark/v2/lang"
1115
"github.com/mmarkdown/mmark/v2/mast"
1216
"github.com/mmarkdown/mmark/v2/mparser"
1317
"github.com/mmarkdown/mmark/v2/render/man"
1418
"github.com/mmarkdown/mmark/v2/render/mhtml"
1519
"github.com/mmarkdown/mmark/v2/render/xml"
16-
17-
"github.com/gomarkdown/markdown"
18-
"github.com/gomarkdown/markdown/ast"
19-
"github.com/gomarkdown/markdown/html"
20-
"github.com/gomarkdown/markdown/parser"
2120
)
2221

2322
var (

mmark_man_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ import (
66
"path/filepath"
77
"testing"
88

9-
"github.com/mmarkdown/mmark/v2/mparser"
10-
"github.com/mmarkdown/mmark/v2/render/man"
11-
129
"github.com/gomarkdown/markdown"
1310
"github.com/gomarkdown/markdown/parser"
1411
"github.com/google/go-cmp/cmp"
12+
"github.com/mmarkdown/mmark/v2/mparser"
13+
"github.com/mmarkdown/mmark/v2/render/man"
1514
)
1615

1716
func TestMmarkMan(t *testing.T) {

mmark_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ import (
77
"strings"
88
"testing"
99

10+
"github.com/gomarkdown/markdown"
11+
"github.com/gomarkdown/markdown/parser"
1012
"github.com/mmarkdown/mmark/v2/lang"
1113
"github.com/mmarkdown/mmark/v2/mparser"
1214
"github.com/mmarkdown/mmark/v2/render/xml"
13-
14-
"github.com/gomarkdown/markdown"
15-
"github.com/gomarkdown/markdown/parser"
1615
)
1716

1817
func TestMmarkXML(t *testing.T) {

mparser/bibliography.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import (
77
"sort"
88
"strings"
99

10+
"github.com/gomarkdown/markdown/ast"
1011
"github.com/mmarkdown/mmark/v2/mast"
1112
"github.com/mmarkdown/mmark/v2/mast/reference"
12-
13-
"github.com/gomarkdown/markdown/ast"
1413
)
1514

1615
// CitationToBibliography walks the AST and gets all the citations from HTML blocks and groups them into
@@ -117,7 +116,7 @@ func NodeBackMatter(doc ast.Node) ast.Node {
117116
return matter
118117
}
119118

120-
// Parse '<reference anchor='CBR03' target=''>' and return the string after anchor= is the ID for the reference.
119+
// Parse '<reference anchor='CBR03' target=">' and return the string after anchor= is the ID for the reference.
121120
func anchorFromReference(data []byte) []byte {
122121
if !bytes.HasPrefix(data, []byte("<reference ")) && !bytes.HasPrefix(data, []byte("<referencegroup ")) {
123122
return nil

mparser/index.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import (
55
"fmt"
66
"sort"
77

8-
"github.com/mmarkdown/mmark/v2/mast"
9-
108
"github.com/gomarkdown/markdown/ast"
9+
"github.com/mmarkdown/mmark/v2/mast"
1110
)
1211

1312
// IndexToDocumentIndex crawls the entire doc searching for indices, it will then return
@@ -17,8 +16,8 @@ import (
1716
// - IndexItem
1817
// - IndexLink
1918
// - IndexSubItem
20-
// - IndexLink
21-
// - IndexLink
19+
// - IndexLink
20+
// - IndexLink
2221
//
2322
// Which can then be rendered by the renderer.
2423
func IndexToDocumentIndex(doc ast.Node) *mast.DocumentIndex {

mparser/title.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ package mparser
33
import (
44
"log"
55

6-
"github.com/mmarkdown/mmark/v2/mast"
7-
86
"github.com/BurntSushi/toml"
97
"github.com/gomarkdown/markdown/ast"
8+
"github.com/mmarkdown/mmark/v2/mast"
109
)
1110

1211
// TitleHook will parse a title and returns it. The start and ending can

render/man/renderer.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/mmarkdown/mmark/v2/lang"
18-
"github.com/mmarkdown/mmark/v2/mast"
19-
2017
"github.com/gomarkdown/markdown/ast"
2118
"github.com/gomarkdown/markdown/html"
19+
"github.com/mmarkdown/mmark/v2/lang"
20+
"github.com/mmarkdown/mmark/v2/mast"
2221
)
2322

2423
// Flags control optional behavior of Markdown renderer.

0 commit comments

Comments
 (0)