Skip to content

Commit 2da4391

Browse files
committed
match github
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 02c384c commit 2da4391

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/markup/markdown/goldmark.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ package markdown
77
import (
88
"bytes"
99
"fmt"
10-
"path"
1110
"regexp"
1211
"strings"
1312

@@ -99,8 +98,7 @@ func (g *ASTTransformer) Transform(node *ast.Document, reader text.Reader, pc pa
9998
}
10099
prefix = strings.Replace(prefix, "/src/", "/media/", 1)
101100

102-
lnk := string(link)
103-
lnk = path.Clean("/" + lnk)[1:]
101+
lnk := strings.TrimLeft(string(link), "/")
104102

105103
lnk = giteautil.URLJoin(prefix, lnk)
106104
link = []byte(lnk)

0 commit comments

Comments
 (0)