File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -959,22 +959,23 @@ replaceStrings tfrom tto ts =
959959
960960 finish = makeNixString . LazyText. toStrict . Builder. toLazyText
961961
962- go orig resultAccum ctx = case lookupPrefix orig of
962+ go source resultAccum ctx = case lookupPrefix source of
963963 Nothing ->
964- process resultAccum orig ctx
964+ process source resultAccum ctx
965965 Just (prefix, replacementNS, rest) ->
966966 ( if prefix == mempty
967967 then
968- process newResultAccum rest
968+ process rest newResultAccum
969969 else
970970 go rest newResultAccum
971- ) (ctx <> newCtx)
971+ ) newCtx
972972 where
973- replacement = Builder. fromText $ stringIgnoreContext replacementNS
973+ replacement = Builder. fromText $ stringIgnoreContext replacementNS
974974 newResultAccum = resultAccum <> replacement
975- newCtx = NixString. getContext replacementNS
975+ additionalCtx = NixString. getContext replacementNS
976+ newCtx = ctx <> additionalCtx
976977 where
977- process r t =
978+ process t r =
978979 maybe
979980 (finish r)
980981 (\ (h, t) -> go t (r <> Builder. singleton h))
You can’t perform that action at this time.
0 commit comments