From 74ed7936a843109e94c356637d62de21b732d8b4 Mon Sep 17 00:00:00 2001 From: 0x4f53 <71916237+0x4f53@users.noreply.github.com> Date: Thu, 8 Aug 2024 00:57:28 +0530 Subject: [PATCH] fixed a bug with substring length --- textsubs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/textsubs.go b/textsubs.go index 5a21111..d0abd61 100644 --- a/textsubs.go +++ b/textsubs.go @@ -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) + } } }