Skip to content

Commit 2feeae3

Browse files
authored
fix guild description to contain guild details (#107)
checking if GuildDescription starts with foundation string and if thats the case, setting description string to be empty fix #93
1 parent 670f838 commit 2feeae3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/TibiaGuildsGuildV3.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,16 @@ func TibiaGuildsGuildV3Impl(guild string, BoxContentHTML string) GuildResponse {
131131
GuildDescriptionFinished = true
132132
}
133133

134-
} else if GuildDescriptionFinished {
134+
}
135+
136+
if GuildDescriptionFinished || strings.HasPrefix(line, "The guild was founded on ") {
135137
// The rest of the Guild information
136138

139+
if strings.HasPrefix(GuildDescription, "The guild was founded on ") {
140+
GuildDescription = ""
141+
GuildDescriptionFinished = true
142+
}
143+
137144
if strings.Contains(line, "The guild was founded on") {
138145
// Regex to get GuildWorld and GuildFounded
139146
subma1b := GuildWorldAndFoundationRegex.FindAllStringSubmatch(line, -1)

0 commit comments

Comments
 (0)