From c3c0e842321970b09b51e88d8a6ed71214c75e2c Mon Sep 17 00:00:00 2001 From: Hauke D Date: Thu, 13 Sep 2018 10:54:25 +0200 Subject: [PATCH] Made import more flexible See fd678a6d9fc19437787de1f455e825d6720140d --- _misc/import_regex_tester.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_misc/import_regex_tester.pl b/_misc/import_regex_tester.pl index 6b304e9..3b330a6 100755 --- a/_misc/import_regex_tester.pl +++ b/_misc/import_regex_tester.pl @@ -20,11 +20,11 @@ with the following differences: (see import_regex_tester.pl) ENDMSG -( $html =~ s{ <(?script\s+src="webperl\.js"\s*> }{}xms )==1 or die; -( $html =~ s{ }{<$+{x}>}xms )==1 or die; -( $html =~ s{ ^ \s* our \s+ \$RUN_CODE_IN_IFRAME\s*=\s*\K0(?=\s*;\s*) }{1}xms )==1 or die; -( $html =~ s{ https?://github.com/haukex/webperl/blob/\Kmaster/web/regex_tester.html }{gh-pages/regex.html}xms )==1 or die; -( $html =~ s{ \#\#\#\#\#\s*-->\n\K }{\n\n}xms )==1 or die; +( $html =~ s{ <(?script\s+src="(?:webperl\.js|__WEBPERLURL__)"\s*> }{}xmsg )==2 or die; +( $html =~ s{ }{<$+{x}>}xmsg )==2 or die; +( $html =~ s{ ^ \s* our \s+ \$RUN_CODE_IN_IFRAME\s*=\s*\K[01](?=\s*;\s*) }{1}xmsg )==1 or die; +( $html =~ s{ https?://github.com/haukex/webperl/blob/\Kmaster/web/regex_tester.html }{gh-pages/regex.html}xmsg )==1 or die; +( $html =~ s{ \#\#\#\#\#\s*-->\n\K }{\n\n}xmsg )==1 or die; open my $ofh, '>:encoding(UTF-8)', $outfn or die "$outfn: $!"; print $ofh $html;