Skip to content

Commit

Permalink
+ fix clickbait regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
m0zgen committed Mar 28, 2023
1 parent b8d49ce commit 2157054
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ func prepareFiles(path string, fi os.FileInfo, err error) error {
)

//r := regexp.MustCompile(`((?m)(#|\s#).*)`)
r2 := regexp.MustCompile(`(?m)(^[$&+,:;=?@#|'<>.\-^*()%!].+$)|(^.*::.*)|(#|\s#.*)|(^.*\/\/.*)|(^.*,.*$)|(^.*\.-.*$)`)
r2 := regexp.MustCompile(
`(?m)(^[$&+,:;=?@#|'<>.\-^*()%!].+$)|(^.*::.*)|(#|\s#.*)|(^.*\/\/.*)|(^.*,.*$)|(^.*\.-.*$)|(^.*[\$\^].*$)`)
// Select empty lines
//r2 := regexp.MustCompile(`(?m)^\s*$[\r\n]*|[\r\n]+\s+\z`)
// Extract domain names from list:
Expand Down Expand Up @@ -726,7 +727,7 @@ func listPublicFilesDir(target string) map[string]string {

func serveTemplate(w http.ResponseWriter, r *http.Request) {

appVersion := "0.1.9"
appVersion := "0.2.0"
hostname, err := os.Hostname()
handleErr(err)
publicFiles := listPublicFilesDir("./public/files/")
Expand Down

0 comments on commit 2157054

Please sign in to comment.