Sfoglia il codice sorgente

style: format code with Go fmt and Gofumpt

This commit fixes the style issues introduced in f9b4c5a according to the output
from Go fmt and Gofumpt.

Details: https://github.com/gogs/gogs/pull/8163
deepsource-autofix[bot] 1 settimana fa
parent
commit
3b7e331191
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      internal/markup/markdown.go

+ 4 - 2
internal/markup/markdown.go

@@ -35,8 +35,10 @@ func IsMarkdownFile(name string) bool {
 	return false
 	return false
 }
 }
 
 
-var validLinksPattern = lazyregexp.New(`^[a-z][\w-]+://|^mailto:`)
-var linkifyURLRegexp = regexp.MustCompile(`^(?:http|https|ftp)://[-a-zA-Z0-9@:%._+~#=]{1,256}(?:\.[a-z]+)?(?::\d+)?(?:[/#?][-a-zA-Z0-9@:%_+.~#$!?&/=();,'\^{}\[\]` + "`" + `]*)?`)
+var (
+	validLinksPattern = lazyregexp.New(`^[a-z][\w-]+://|^mailto:`)
+	linkifyURLRegexp  = regexp.MustCompile(`^(?:http|https|ftp)://[-a-zA-Z0-9@:%._+~#=]{1,256}(?:\.[a-z]+)?(?::\d+)?(?:[/#?][-a-zA-Z0-9@:%_+.~#$!?&/=();,'\^{}\[\]` + "`" + `]*)?`)
+)
 
 
 func isLink(link []byte) bool {
 func isLink(link []byte) bool {
 	return validLinksPattern.Match(link)
 	return validLinksPattern.Match(link)