File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -961,21 +961,20 @@ replaceStrings tfrom tto ts =
961961
962962 go orig result ctx = case lookupPrefix orig of
963963 Nothing ->
964- ( case Text. uncons orig of
965- Nothing ->
966- finish result
967- Just (h, t) ->
968- go t (result <> Builder. singleton h)) ctx
964+ maybe
965+ (finish result)
966+ ( \ (h, t) -> go t ( result <> Builder. singleton h))
967+ ( Text. uncons orig)
968+ ctx
969969 Just (prefix, replacementNS, rest) ->
970970 (case prefix of
971971 " " ->
972- case Text. uncons rest of
973- Nothing ->
974- finish (result <> Builder. fromText replacement)
975- Just (h, t) ->
976- go t (mconcat [ result
977- , Builder. fromText replacement
978- , Builder. singleton h ])
972+ maybe
973+ (finish (result <> Builder. fromText replacement))
974+ (\ (h,t) -> go t (mconcat [ result
975+ , Builder. fromText replacement
976+ , Builder. singleton h ]))
977+ (Text. uncons rest)
979978 _prefix ->
980979 go rest (result <> Builder. fromText replacement)) (ctx <> newCtx)
981980 where
You can’t perform that action at this time.
0 commit comments