Fix multiline replacements