generated from VLADIMIR/template
add stat and fix get place
This commit is contained in:
@@ -87,8 +87,13 @@ func (s *StoryService) GetPlace(code string) *Place {
|
||||
for _, place := range s.story.Places {
|
||||
if clearCode(place.Code) == code {
|
||||
re := regexp.MustCompile(`\(\[[a-zA-Zа-яА-Я\d-]+\]\)`)
|
||||
place.Text = re.ReplaceAllString(place.Text, "")
|
||||
return place
|
||||
text := re.ReplaceAllString(place.Text, "")
|
||||
return &Place{
|
||||
Code: place.Code,
|
||||
Name: place.Name,
|
||||
Text: text,
|
||||
Applications: place.Applications,
|
||||
}
|
||||
}
|
||||
}
|
||||
return &Place{
|
||||
|
||||
Reference in New Issue
Block a user