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
|
nextStart
|
||||||
| Nothing <- maybeEnd
|
| Nothing <- maybeEnd
|
||||||
= start
|
= start
|
||||||
| length start < borderLength
|
| (Just end) <- maybeEnd, length end < borderLength
|
||||||
= start <> impureNonNull [head alphabet]
|
= impureNonNull $ end <> [head alphabet]
|
||||||
| (Just end) <- maybeEnd
|
| (Just end) <- maybeEnd
|
||||||
= impureNonNull $ reverse $ increase $ reverse end
|
= impureNonNull $ reverse $ increase $ reverse end
|
||||||
alphabetCycle :: [CI Char]
|
alphabetCycle :: [CI Char]
|
||||||
@ -611,8 +611,8 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences
|
|||||||
nextChar
|
nextChar
|
||||||
| c `elem` alphabet
|
| c `elem` alphabet
|
||||||
= dropWhile (/= c) alphabetCycle List.!! 1
|
= dropWhile (/= c) alphabetCycle List.!! 1
|
||||||
| otherwise -- shouldn't happen, simply use head alphabet
|
| otherwise -- shouldn't happen, simply use head alphabet as a fallback
|
||||||
= error $ "uncaught non-alphabet char: " ++ show c --TODO head alphabet
|
= head alphabet
|
||||||
|
|
||||||
transformTag :: Int -> [CI Char] -> [CI Char]
|
transformTag :: Int -> [CI Char] -> [CI Char]
|
||||||
transformTag l tag = case rule of
|
transformTag l tag = case rule of
|
||||||
|
|||||||
Reference in New Issue
Block a user