mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 09:15:33 +00:00
Suche nach Musenalm-ID implementiert
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
package seed
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/helpers/datatypes"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
"golang.org/x/text/unicode/norm"
|
||||
)
|
||||
|
||||
func NormalizeString(s string) string {
|
||||
s = strings.TrimSpace(s)
|
||||
s = strings.ReplaceAll(s, "<div>", "")
|
||||
s = strings.ReplaceAll(s, "</div>", "")
|
||||
s = datatypes.NormalizeString(s)
|
||||
s = norm.NFC.String(s)
|
||||
return s
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user