@@ -4527,7 +4527,7 @@ function replacePredefinedConstants(string $targetDirectory, array $constMap, ar
4527
4527
4528
4528
foreach ($ it as $ file ) {
4529
4529
$ 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 ))) {
4531
4531
continue ;
4532
4532
}
4533
4533
@@ -4586,6 +4586,7 @@ function replacePredefinedConstants(string $targetDirectory, array $constMap, ar
4586
4586
}
4587
4587
4588
4588
$ manualTermElement ->parentNode ->replaceChild ($ newTermElement , $ manualTermElement );
4589
+ $ updated = true ;
4589
4590
}
4590
4591
}
4591
4592
@@ -4637,11 +4638,19 @@ function replacePredefinedConstants(string $targetDirectory, array $constMap, ar
4637
4638
"/REPLACED-ENTITY-([A-Za-z0-9._{}%-]+?;)/ " ,
4638
4639
'/<appendix\s+xmlns="([^"]+)"\s+xml:id="([^"]+)"\s*>/i ' ,
4639
4640
'/<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 ' ,
4640
4645
],
4641
4646
[
4642
4647
"&$1 " ,
4643
4648
"<appendix xml:id= \"$2 \" xmlns= \"$1 \"> " ,
4644
4649
"<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 \"> " ,
4645
4654
],
4646
4655
$ replacedXml
4647
4656
);
0 commit comments