From 06b3e26ce0375189b57e3d5dcae6db8e5ad2851b Mon Sep 17 00:00:00 2001 From: Dylan Lloyd Date: Sun, 30 Sep 2012 19:37:02 -0400 Subject: [PATCH] fix for failing parsing of xml::simple errors --- lib/DDG/Goodie/IsValid/XML.pm | 2 +- t/IsValid.t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/DDG/Goodie/IsValid/XML.pm b/lib/DDG/Goodie/IsValid/XML.pm index 0b6708ad7..322a21ae3 100644 --- a/lib/DDG/Goodie/IsValid/XML.pm +++ b/lib/DDG/Goodie/IsValid/XML.pm @@ -24,7 +24,7 @@ handle remainder => sub { # warn $_; - $_ =~ /^\n?(.* at line \d+, column \d+, byte \d+) at/; + $_ =~ /\n?(.* at line \d+, column \d+, byte \d+) at/; return ('invalid: ', $1); }; diff --git a/t/IsValid.t b/t/IsValid.t index 3617f183f..e446bc694 100644 --- a/t/IsValid.t +++ b/t/IsValid.t @@ -36,8 +36,8 @@ ddg_goodie_test( ddg_goodie_test( [qw(DDG::Goodie::IsValid::XML)], 'is valid xml lol' => test_zci( - 'Your XML is invalid: no element found at line 1, column 10, byte 9', - html => 'Your XML is invalid:
no element found at line 1, column 10, byte 9
' + qr/Your XML is invalid: no element found at line \d{1,2}, column \d{1,2}, byte \d{1,2}/, + html => qr/Your XML is invalid:
no element found at line \d{1,2}, column \d{1,2}, byte \d{1,2}<\/pre>/
 	)
 );