From 3b3a297ccab97d720f30ae88b467ea3805dbb486 Mon Sep 17 00:00:00 2001 From: wraitii Date: Sat, 6 Mar 2021 13:57:11 +0000 Subject: [PATCH] Fix checkrefs following D11 / 1c9efa6fb5 Fixes D11 / 1c9efa6fb5. The problem is that some GUI pages were simply named "page.xml" which the regex didn't like. Accepted By: Nescio Differential Revision: https://code.wildfiregames.com/D3644 This was SVN commit r25022. --- source/tools/entity/checkrefs.pl | 4 ++-- source/tools/xmlvalidator/validate.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/tools/entity/checkrefs.pl b/source/tools/entity/checkrefs.pl index 852aaaacc4..96370df373 100755 --- a/source/tools/entity/checkrefs.pl +++ b/source/tools/entity/checkrefs.pl @@ -435,8 +435,8 @@ sub add_gui_xml { push @files, $f; - # GUI page definitions are assumed to be named page_[something].xml and alone in that. - if ($f =~ /\/page_[^.\/]+\.xml$/) + # GUI page definitions are assumed to be named page[_something].xml and alone in that. + if ($f =~ /\/page(_[^.\/]+)?\.xml$/) { push @roots, $f; my $xml = XMLin(vfs_to_physical($f), ForceArray => [qw(include)], KeyAttr => []) or die "Failed to parse '$f': $!"; diff --git a/source/tools/xmlvalidator/validate.pl b/source/tools/xmlvalidator/validate.pl index 6f5739782a..07277cf201 100644 --- a/source/tools/xmlvalidator/validate.pl +++ b/source/tools/xmlvalidator/validate.pl @@ -98,8 +98,8 @@ sub validate_guis my (@guipages, @guixmls); for my $f (@files) { - # GUI page definitions are assumed to be named page_[something].xml and alone in that. - if ($f =~ /\/page_[^.\/]+\.xml$/) + # GUI page definitions are assumed to be named page[_something].xml and alone in that. + if ($f =~ /\/page(_[^.\/]+)?\.xml$/) { push @guipages, $f; }