Skip to content

Commit 582a180

Browse files
committed
Make code cleaner
Signed-off-by: Gary Kim <[email protected]>
1 parent d7788bf commit 582a180

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

modules/markup/html.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,7 @@ func sha1CurrentPatternProcessor(ctx *postProcessCtx, node *html.Node) {
662662
// a commit in the repository before making it a link.
663663
if ctx.metas["repoPath"] != "" {
664664
repo, err := git.OpenRepository(ctx.metas["repoPath"])
665-
if err != nil {
666-
return
667-
}
668-
if !repo.IsCommitExist(hash) {
665+
if err != nil || !repo.IsCommitExist(hash) {
669666
return
670667
}
671668
}

0 commit comments

Comments
 (0)