Revert "Fix #5679 again after recent changes in core"
This reverts commit 2bfaacd170
.
Fixes #6821
This commit is contained in:
parent
37c1b7bf6e
commit
7a03cc69e1
1 changed files with 3 additions and 2 deletions
|
@ -351,8 +351,9 @@ def main():
|
||||||
if ins_bef is None and ins_aft is None:
|
if ins_bef is None and ins_aft is None:
|
||||||
ins_aft = 'EOF'
|
ins_aft = 'EOF'
|
||||||
|
|
||||||
# Replace the newline character with an actual newline.
|
# Replace the newline character with an actual newline. Don't replace
|
||||||
line = params['line'].decode('string_escape')
|
# escaped \\n, hence sub and not str.replace.
|
||||||
|
line = re.sub(r'\n', os.linesep, params['line'])
|
||||||
|
|
||||||
present(module, dest, params['regexp'], line,
|
present(module, dest, params['regexp'], line,
|
||||||
ins_aft, ins_bef, create, backup, backrefs)
|
ins_aft, ins_bef, create, backup, backrefs)
|
||||||
|
|
Loading…
Reference in a new issue