You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Copied from https://github.com/serlo/api.serlo.org/blob/ce94045b513e59da1ddd191b498fe01f6ff6aa0a/packages/server/src/schema/uuid/abstract-uuid/resolvers.ts#L685-L703
204
-
// Try to keep both functions in sync
205
-
functiontoSlug(name: string){
206
-
returnname
207
-
.toLowerCase()
208
-
.replace(/ä/g,'ae')
209
-
.replace(/ö/g,'oe')
210
-
.replace(/ü/g,'ue')
211
-
.replace(/ß/g,'ss')
212
-
.replace(/á/g,'a')
213
-
.replace(/é/g,'e')
214
-
.replace(/í/g,'i')
215
-
.replace(/ó/g,'o')
216
-
.replace(/ú/g,'u')
217
-
.replace(/ñ/g,'n')
218
-
.replace(//g,'-')// replace spaces with hyphens
219
-
.replace(/[^\w-]+/g,'')// remove all non-word chars including _
0 commit comments