Commits

Toby Inkster committed 4172564

quick bugfix release 0.002

Comments (0)

Files changed (3)

lib/XML/LibXML/PrettyPrint.pm

 BEGIN
 {
 	$XML::LibXML::PrettyPrint::AUTHORITY = 'cpan:TOBYINK';
-	$XML::LibXML::PrettyPrint::VERSION   = '0.001';
+	$XML::LibXML::PrettyPrint::VERSION   = '0.002';
 }
 
 use Carp 0 qw(croak carp);
 	                 tr track ul];
 	my @pre     = qw[plaintext output pre script style textarea xmp];
 	
-	my %elements = (
-		block    => \@block,
-		compact  => \@compact,
-		inline   => \@inline,
-		preserves_whitespace => \@pre,
-		);
+	my $rdfa_lit_content = sub
+	{
+		my ($el) = @_;
+		return TRUE
+			if ($el->hasAttribute('property') and not $el->hasAttribute('content'));
+		return undef;
+	};
 	
 	sub new_for_html
 	{
 		my ($class, %options) = @_;
-		$class->new(%options, element => \%elements)
+		
+		return $class->new(
+			%options,
+			element => {
+				block    => [@block],
+				compact  => [@compact],
+				inline   => [@inline],
+				preserves_whitespace => [@pre, $rdfa_lit_content],
+				},
+			);
 	}
 }
 
 	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/XML-LibXML-PrettyPrint-0.001.tar.gz> ;
 	rdfs:label      "Initial release" .
 
+dist:project :release dist:v_0-002 .
+dist:v_0-002
+	a               :Version ;
+	dc:issued       "2011-11-03"^^xsd:date ;
+	:revision       "0.002"^^xsd:string ;
+	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/XML-LibXML-PrettyPrint-0.002.tar.gz> ;
+	dcs:changeset [
+		dcs:versus dist:v_0-001 ;
+		dcs:item   [ a dcs:Packaging ; rdfs:label "Declare dependency on 'Pragmatic'."@en ] ;
+		dcs:item   [ a dcs:Bugfix ; rdfs:label "new_from_html constructor was exposing a private lexical variable that I didn't want to expose."@en ] ;
+		dcs:item   [ rdfs:label "Make elements with @property but no @content preserve whitespace in HTML."@en ]
+		] .

meta/makefile.ttl

 		"Test::Warn 0.20" ,
 		"Test::More 0.61" ;
 	:requires 
+		"Pragmatic" ,
 		"Scalar::Util" ,
 		"Carp" ,
 		"IO::Handle" ,