From 22934bf501dd1984665c1cda80d993ac900e31d3 Mon Sep 17 00:00:00 2001 From: xunbu Date: Sun, 7 Sep 2025 09:15:01 +0800 Subject: [PATCH] =?UTF-8?q?python3.11=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docutranslate/__init__.py | 2 +- docutranslate/utils/json_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docutranslate/__init__.py b/docutranslate/__init__.py index eeb29b1..8181891 100644 --- a/docutranslate/__init__.py +++ b/docutranslate/__init__.py @@ -1,3 +1,3 @@ # SPDX-FileCopyrightText: 2025 QinHan # SPDX-License-Identifier: MPL-2.0 -__version__="1.4.2" \ No newline at end of file +__version__="1.4.2.post1" \ No newline at end of file diff --git a/docutranslate/utils/json_utils.py b/docutranslate/utils/json_utils.py index f1c9bb9..2812303 100644 --- a/docutranslate/utils/json_utils.py +++ b/docutranslate/utils/json_utils.py @@ -89,7 +89,7 @@ def fix_json_string(json_string): def repl(m:re.Match): return f'{'"' if m.group(1) else ""},\n"{m.group(2)}":{'"' if m.group(3) else ""}' fixed_json = re.sub( - r'([“”"])?\s*[,,]\s*["“”]\s*(\d+)\s*["“”]\s*[::]\s*(["“”])?', + r"""([“”"])?\s*[,,]\s*["“”]\s*(\d+)\s*["“”]\s*[::]\s*(["“”])?""", repl, json_string, re.MULTILINE