Skip to content

Commit

Permalink
fixed a bug with substring length
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4f53 committed Aug 7, 2024
1 parent 5248fbf commit 74ed793
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion textsubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ func getSubdomains(text string) ([]string, error) {
for _, unbrokenSubdomain := range subdomains {
brokenItems := BreakFusedItems(unbrokenSubdomain)
for _, brokenItem := range brokenItems {
finalList = append(finalList, brokenItem)
if len(brokenItem) > 2 && strings.Contains(brokenItem, ".") {
finalList = append(finalList, brokenItem)
}
}
}

Expand Down

0 comments on commit 74ed793

Please sign in to comment.