diff --git a/translations/translationtool/src/translationtool.php b/translations/translationtool/src/translationtool.php index cbe8a5c5..22ee494d 100644 --- a/translations/translationtool/src/translationtool.php +++ b/translations/translationtool/src/translationtool.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2017-2025 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Jakob Sack * SPDX-License-Identifier: AGPL-3.0-or-later */ @@ -366,8 +366,8 @@ private function createFakeFileForVueFiles(): void { } $matches = []; - if (preg_match('/]*>(.+)<\/script>/s', $vueSource, $matches)) { - $fakeFileContent .= $matches[1] . ";\n"; + if (preg_match_all('/]*>(.+)<\/script>/sU', $vueSource, $matches, PREG_PATTERN_ORDER)) { + $fakeFileContent .= implode('', $matches[1]) . ";\n"; } if (preg_match('/