fix: mappingDescription doesn't overlap for the first n rooms/with small names/matrikelnummer
This commit is contained in:
parent
6ccc192426
commit
fc35fd26c1
@ -593,8 +593,8 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences
|
||||
nextStart
|
||||
| Nothing <- maybeEnd
|
||||
= start
|
||||
| length start < borderLength
|
||||
= start <> impureNonNull [head alphabet]
|
||||
| (Just end) <- maybeEnd, length end < borderLength
|
||||
= impureNonNull $ end <> [head alphabet]
|
||||
| (Just end) <- maybeEnd
|
||||
= impureNonNull $ reverse $ increase $ reverse end
|
||||
alphabetCycle :: [CI Char]
|
||||
@ -611,8 +611,8 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences
|
||||
nextChar
|
||||
| c `elem` alphabet
|
||||
= dropWhile (/= c) alphabetCycle List.!! 1
|
||||
| otherwise -- shouldn't happen, simply use head alphabet
|
||||
= error $ "uncaught non-alphabet char: " ++ show c --TODO head alphabet
|
||||
| otherwise -- shouldn't happen, simply use head alphabet as a fallback
|
||||
= head alphabet
|
||||
|
||||
transformTag :: Int -> [CI Char] -> [CI Char]
|
||||
transformTag l tag = case rule of
|
||||
|
||||
Loading…
Reference in New Issue
Block a user