diff options
author | Ville Skytt? <ville.skytta@iki.fi> | 2011-07-23 18:41:30 +0300 |
---|---|---|
committer | Ville Skytt? <ville.skytta@iki.fi> | 2011-07-23 18:41:30 +0300 |
commit | 721b1d4bfff65e4afbcfbb813702eacf069b59c6 (patch) | |
tree | 8532a9e10bab016150dd37e6542c7350205f479e /httpd/cgi-bin/check | |
parent | 12743a4e7720adc3ff04c8a3d4e2d87d9e946c77 (diff) | |
download | markup-validator-721b1d4bfff65e4afbcfbb813702eacf069b59c6.zip markup-validator-721b1d4bfff65e4afbcfbb813702eacf069b59c6.tar.gz markup-validator-721b1d4bfff65e4afbcfbb813702eacf069b59c6.tar.bz2 |
Purge workaround for rt.cpan.org#66642, XML::LibXML >= 1.73 is now required.
https://rt.cpan.org/Public/Bug/Display.html?id=66642
Diffstat (limited to 'httpd/cgi-bin/check')
-rwxr-xr-x | httpd/cgi-bin/check | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 274b2cd..94288d0 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -220,7 +220,7 @@ EOF local $ENV{XML_CATALOG_FILES} = catfile($CFG->{Paths}->{SGML}->{Library}, 'catalog.xml'); require XML::LibXML; - XML::LibXML->VERSION(1.70); # Need 1.70 for (working) structured errors + XML::LibXML->VERSION(1.73); # Need 1.73 for rt.cpan.org #66642 } # end of BEGIN block. @@ -1331,25 +1331,6 @@ sub xmlwf (\$) $err->{type} = "E"; $err->{msg} = $err_obj->message(); - # Ugly workaround for XML::LibXML reporting column 80 when the - # error occurs beyond that: - # http://rt.cpan.org/Public/Bug/Display.html?id=66642 - if ($err->{char} && $err->{char} == 80 && - # This workaround does not apply to non-document errors, i.e. - # ones that have $err->{uri}. - !$err->{uri} && $err->{line}) - { - # Get context reported by XML::LibXML, ... - my $ctx = $err_obj->context(); - if ($ctx && length($ctx) == $err->{char}) { - # ... try to locate it in our original source line, ... - my $line = $File->{Content}->[$err->{line}-1] || ''; - my $ix = index($line, $ctx); - # ... and adjust column offset accordingly. - $err->{char} += $ix if $ix > 0; - } - } - $err_obj = $err_obj->_prev(); unshift(@{$File->{WF_Errors}}, $err); |