Skip to content

Instantly share code, notes, and snippets.

@vovkasm
Created October 9, 2012 05:53
Show Gist options
  • Save vovkasm/3856876 to your computer and use it in GitHub Desktop.
Save vovkasm/3856876 to your computer and use it in GitHub Desktop.
fix warnings when no errors occured in HTML::Tidy::parse
diff --git a/lib/HTML/Tidy.pm b/lib/HTML/Tidy.pm
index 079c8a8..26ee3b0 100644
--- a/lib/HTML/Tidy.pm
+++ b/lib/HTML/Tidy.pm
@@ -228,9 +228,9 @@ sub parse {
$self->{config_file},
$self->{tidy_options}
);
- utf8::decode($errorblock);
-
return unless defined $errorblock;
+
+ utf8::decode($errorblock);
return !$self->_parse_errors($filename, $errorblock, $newline);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment