Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ func Main() int {
fmt.Printf("\tclick %[1]s-repo href \"https://%s%[1]s\"\n", repo, *prefix)
}

fmt.Println("\n\tclassDef outline stroke-dasharray:6,fill:none;")
fmt.Printf("\tclass %s outline\n", strings.Join(subgraphs, ","))
if len(subgraphs) > 0 {
fmt.Println("\n\tclassDef outline stroke-dasharray:6,fill:none;")
fmt.Printf("\tclass %s outline\n", strings.Join(subgraphs, ","))
}
return 0
}

Expand Down
16 changes: 16 additions & 0 deletions testdata/no-outline.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
stdin go-mod-graph.txt
exec modgraph -prefix github.com/example/
cmp stdout go.md

-- go-mod-graph.txt --
github.com/example/foo github.com/example/bar
github.com/example/bar github.com/example/baz
github.com/example/foo github.com/example/baz

-- go.md --
bar --> baz
click bar href "https://github.com/example/bar"
baz
click baz href "https://github.com/example/baz"
foo --> bar
click foo href "https://github.com/example/foo"
Loading