Skip to content

Commit e4bc2e7

Browse files
committed
fix: クエストの説明の中にダブルクオーテーションが存在した場合に翻訳後にダブルクオーテーションが外れる問題の解消
1 parent 34da756 commit e4bc2e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
USER = 'Y-RyuZU'
1212
REPO = 'MinecraftModsLocalizer'
13-
VERSION = 'v2.0.2'
13+
VERSION = 'v2.0.3'

src/quests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def translate_quests_from_snbt(file_path):
4444
description_pattern = r'description: \[\s*([\s\S]*?)\s*\]'
4545
description_matches = re.findall(description_pattern, content)
4646
for match in description_matches:
47-
for inner_match in re.findall(r'"(.*?)"', match):
47+
for inner_match in re.findall(r'(?<!\\)"(.*?)(?<!\\)"', match):
4848
if inner_match: # Non-empty strings
4949
extracted_strings.append(inner_match)
5050

0 commit comments

Comments
 (0)