equal
deleted
inserted
replaced
70 if teamname tm == teamname t then |
70 if teamname tm == teamname t then |
71 tm : ts |
71 tm : ts |
72 else |
72 else |
73 t : replaceTeam tm ts |
73 t : replaceTeam tm ts |
74 |
74 |
|
75 -- NOTE: Don't forget to update the error messages when you change the naming rules! |
75 illegalName :: B.ByteString -> Bool |
76 illegalName :: B.ByteString -> Bool |
76 illegalName b = B.null b || length s > 40 || all isSpace s || isSpace (head s) || isSpace (last s) || any isIllegalChar s |
77 illegalName b = B.null b || length s > 40 || all isSpace s || isSpace (head s) || isSpace (last s) || any isIllegalChar s |
77 where |
78 where |
78 s = UTF8.toString b |
79 s = UTF8.toString b |
79 isIllegalChar c = c `List.elem` ("$()*+?[]^{|}\x7F" ++ ['\x00'..'\x1F']) |
80 isIllegalChar c = c `List.elem` ("$()*+?[]^{|}\x7F" ++ ['\x00'..'\x1F']) |