A couple of fixes

This commit is contained in:
Zvonimir Sabljic
2023-08-10 08:44:02 +02:00
parent 265b2143a9
commit 795ebfd97e
3 changed files with 8 additions and 5 deletions

View File

@@ -146,7 +146,7 @@ def replace_functions(obj):
return obj
def fix_json_newlines(s):
pattern = r'("(?:\\.|[^"\\])*")'
pattern = r'("(?:\\\\n|\\.|[^"\\])*")'
def replace_newlines(match):
return match.group(1).replace('\n', '\\n')