Skip to content

Commit cc2a68e

Browse files
committed
Fix predefined constant page synchonization
1 parent ca3f3e7 commit cc2a68e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

build/gen_stub.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -4527,7 +4527,7 @@ function replacePredefinedConstants(string $targetDirectory, array $constMap, ar
45274527

45284528
foreach ($it as $file) {
45294529
$pathName = $file->getPathName();
4530-
if (!preg_match('/(?:[\w\.]*constants[\w\.]*|tokens|filters).xml$/i', basename($pathName))) {
4530+
if (!preg_match('/(?:[\w\.]*constants[\w\.]*|tokens).xml$/i', basename($pathName))) {
45314531
continue;
45324532
}
45334533

@@ -4586,6 +4586,7 @@ function replacePredefinedConstants(string $targetDirectory, array $constMap, ar
45864586
}
45874587

45884588
$manualTermElement->parentNode->replaceChild($newTermElement, $manualTermElement);
4589+
$updated = true;
45894590
}
45904591
}
45914592

@@ -4637,11 +4638,19 @@ function replacePredefinedConstants(string $targetDirectory, array $constMap, ar
46374638
"/REPLACED-ENTITY-([A-Za-z0-9._{}%-]+?;)/",
46384639
'/<appendix\s+xmlns="([^"]+)"\s+xml:id="([^"]+)"\s*>/i',
46394640
'/<appendix\s+xmlns="([^"]+)"\s+xmlns:xlink="([^"]+)"\s+xml:id="([^"]+)"\s*>/i',
4641+
'/<sect2\s+xmlns="([^"]+)"\s+xml:id="([^"]+)"\s*>/i',
4642+
'/<sect2\s+xmlns="([^"]+)"\s+xmlns:xlink="([^"]+)"\s+xml:id="([^"]+)"\s*>/i',
4643+
'/<chapter\s+xmlns="([^"]+)"\s+xml:id="([^"]+)"\s*>/i',
4644+
'/<chapter\s+xmlns="([^"]+)"\s+xmlns:xlink="([^"]+)"\s+xml:id="([^"]+)"\s*>/i',
46404645
],
46414646
[
46424647
"&$1",
46434648
"<appendix xml:id=\"$2\" xmlns=\"$1\">",
46444649
"<appendix xml:id=\"$3\" xmlns=\"$1\" xmlns:xlink=\"$2\">",
4650+
"<sect2 xml:id=\"$2\" xmlns=\"$1\">",
4651+
"<sect2 xml:id=\"$3\" xmlns=\"$1\" xmlns:xlink=\"$2\">",
4652+
"<chapter xml:id=\"$2\" xmlns=\"$1\">",
4653+
"<chapter xml:id=\"$3\" xmlns=\"$1\" xmlns:xlink=\"$2\">",
46454654
],
46464655
$replacedXml
46474656
);

0 commit comments

Comments
 (0)