entIeths of a Ioint). Default is 0.
-So if you wanted the left margin to be an additional half inch larger,
-you'd set C<< lm => 720 >> (since there's 1440 twips in an inch).
-If you wanted it to be about 1.5cm larger, you'd set
-C<< lw => 850 >> (since there's about 567 twips in a centimeter).
+So if you wanted the left margin to be an additional half inch larger, you'd
+set C<< lm => 720 >> (since there's 1440 twips in an inch). If you wanted it to
+be about 1.5cm larger, you'd set C<< lw => 850 >> (since there's about 567
+twips in a centimeter).
=item rm
@@ -556,74 +557,72 @@
=item normal_halfpoint_size
-This is the size of normal text in the document, in I-points.
-The default value is 22, meaning that normal text is in 11 point.
+This is the size of normal text in the document, in I-points. The default
+value is 22, meaning that normal text is in 11 point.
=item header_halfpoint_size
-This is the size of text used in the document's page-header, in
-I-points. The default value is 17, meaning that normal text is in
-7.5 point. Currently, the header consists just of "p.I"
-in the upper-right-hand corner, and cannot be disabled.
+This is the size of text used in the document's page-header, in I-points.
+The default value is 17, meaning that normal text is in 7.5 point. Currently,
+the header consists just of "p.I" in the upper-right-hand corner,
+and cannot be disabled.
=item head1_halfpoint_size ... head6_halfpoint_size
-These control the font size of each heading level, in half-twips. For
-example, the default for head3_halfpoint_size is 25, meaning that HTML
-C<< ...
>> text will be in 12.5 point text (in addition to being
-underlined and in the heading font).
+These control the font size of each heading level, in half-twips. For example,
+the default for head3_halfpoint_size is 25, meaning that HTML C<< ...
+>> text will be in 12.5 point text (in addition to being underlined and in the
+heading font).
=item codeblock_halfpoint_size
-This controls the font size (in half-points) of the text used for
-C<< ...
>> text. By default, it is 18, meaning 9 point.
+This controls the font size (in half-points) of the text used for C<<
+...
>> text. By default, it is 18, meaning 9 point.
=item fontname_body
-This option controls what font is to be used for the body of the
-text -- that is, everything other than heading text and text in
-pre/code/tt elements. The default value is currently "Times". Other
-handy values I can suggest using are "Georgia" or "Bookman Old Style".
+This option controls what font is to be used for the body of the text -- that
+is, everything other than heading text and text in pre/code/tt elements. The
+default value is currently "Times". Other handy values I can suggest using are
+"Georgia" or "Bookman Old Style".
=item fontname_code
-This option controls what font is to be used for text in pre/code/tt
-elements. The default value is currently "Courier New".
+This option controls what font is to be used for text in pre/code/tt elements.
+The default value is currently "Courier New".
=item fontname_headings
-This option controls what font name is to be used for headings. You can
-use the same font as fontname_body, but I prefer a sans-serif font, so
-the default value is currently "Arial". Also consider
-"Tahoma" and "Verdana".
+This option controls what font name is to be used for headings. You can use
+the same font as fontname_body, but I prefer a sans-serif font, so the default
+value is currently "Arial". Also consider "Tahoma" and "Verdana".
=item document_language
-This option controls what Microsoft language number will be specified as
-the language for this document. The current default value is 1033, for
-US English. Consult an RTF reference for other language numbers.
+This option controls what Microsoft language number will be specified as the
+language for this document. The current default value is 1033, for US English.
+Consult an RTF reference for other language numbers.
=item hr_width
-This option controls how many underline characters will be used for
-rendering a "
" tag. Its default value is currently 50. You can
-usually leave this alone, but under some circumstances you might want to
-use a smaller or larger number.
+This option controls how many underline characters will be used for rendering a
+"
" tag. Its default value is currently 50. You can usually leave this
+alone, but under some circumstances you might want to use a smaller or larger
+number.
=item no_prolog
If this option is set to a true value, HTML::FormatRTF will make a point of
-I emitting the RTF prolog before the document. By default, this is
-off, meaning that HTML::FormatRTF I emit the prolog. This option
-is of interest only to advanced users.
+I emitting the RTF prolog before the document. By default, this is off,
+meaning that HTML::FormatRTF I emit the prolog. This option is of
+interest only to advanced users.
=item no_trailer
If this option is set to a true value, HTML::FormatRTF will make a point of
-I emitting the RTF trailer at the end of the document. By default,
-this is off, meaning that HTML::FormatRTF I emit the bit of RTF
-that ends the document. This option is of interest only to advanced
-users.
+I emitting the RTF trailer at the end of the document. By default, this
+is off, meaning that HTML::FormatRTF I emit the bit of RTF that ends the
+document. This option is of interest only to advanced users.
=back
@@ -637,23 +636,16 @@
=head1 BUGS AND LIMITATIONS
-No bugs have been reported.
-
-Please report any bugs or feature requests through the web interface at
-L.
+You can make new bug reports, and view existing ones, through the
+web interface at L.
=head1 AVAILABILITY
-The project homepage is L.
+The project homepage is L.
The latest version of this module is available from the Comprehensive Perl
Archive Network (CPAN). Visit L to find a CPAN
-site near you, or see L.
-
-The development version lives at L
-and may be cloned from L.
-Instead of sending patches, please fork this project using the standard
-git and github infrastructure.
+site near you, or see L.
=head1 AUTHORS
@@ -675,13 +667,9 @@
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2011 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
+This software is copyright (c) 2013 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
-
-
-__END__
-
diff -Nru libhtml-format-perl-2.10/lib/HTML/FormatText.pm libhtml-format-perl-2.11/lib/HTML/FormatText.pm
--- libhtml-format-perl-2.10/lib/HTML/FormatText.pm 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/lib/HTML/FormatText.pm 2013-10-27 20:57:43.000000000 +0000
@@ -13,7 +13,7 @@
use base 'HTML::Formatter';
-our $VERSION = '2.10'; # VERSION
+our $VERSION = '2.11'; # VERSION
our $AUTHORITY = 'cpan:NIGELM'; # AUTHORITY
# ------------------------------------------------------------------------
@@ -208,12 +208,13 @@
1;
__END__
+
=pod
=for test_synopsis 1;
__END__
-=for stopwords latin1 leftmargin lm plaintext rightmargin
+=for stopwords latin1 leftmargin lm plaintext rightmargin rm CPAN homepage
=head1 NAME
@@ -221,7 +222,7 @@
=head1 VERSION
-version 2.10
+version 2.11
=head1 SYNOPSIS
@@ -242,17 +243,15 @@
=head1 DESCRIPTION
-HTML::FormatText is a formatter that outputs plain latin1 text.
-All character attributes (bold/italic/underline) are ignored.
-Formatting of HTML tables and forms is not implemented.
-
-HTML::FormatText is built on L and documentation
-for that module applies to this - especially
-L, L and
-L.
+HTML::FormatText is a formatter that outputs plain latin1 text. All character
+attributes (bold/italic/underline) are ignored. Formatting of HTML tables and
+forms is not implemented.
+
+HTML::FormatText is built on L and documentation for that
+module applies to this - especially L,
+L and L.
-You might specify the following parameters when constructing the
-formatter:
+You might specify the following parameters when constructing the formatter:
=over 4
@@ -276,23 +275,16 @@
=head1 BUGS AND LIMITATIONS
-No bugs have been reported.
-
-Please report any bugs or feature requests through the web interface at
-L.
+You can make new bug reports, and view existing ones, through the
+web interface at L.
=head1 AVAILABILITY
-The project homepage is L.
+The project homepage is L.
The latest version of this module is available from the Comprehensive Perl
Archive Network (CPAN). Visit L to find a CPAN
-site near you, or see L.
-
-The development version lives at L
-and may be cloned from L.
-Instead of sending patches, please fork this project using the standard
-git and github infrastructure.
+site near you, or see L.
=head1 AUTHORS
@@ -314,10 +306,9 @@
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2011 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
+This software is copyright (c) 2013 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
-
diff -Nru libhtml-format-perl-2.10/lib/HTML/Formatter.pm libhtml-format-perl-2.11/lib/HTML/Formatter.pm
--- libhtml-format-perl-2.10/lib/HTML/Formatter.pm 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/lib/HTML/Formatter.pm 2013-10-27 20:57:43.000000000 +0000
@@ -14,7 +14,7 @@
# this should be commented out in release versions....
##use Smart::Comments;
-our $VERSION = '2.10'; # VERSION
+our $VERSION = '2.11'; # VERSION
our $AUTHORITY = 'cpan:NIGELM'; # AUTHORITY
#
@@ -734,6 +734,10 @@
$_[0] =~ s/^\n//;
$self->pre_out( $_[0] );
}
+ elsif ( $self->{blockquote} ) {
+ $_[0] =~ s/\A\s//;
+ $self->blockquote_out( $_[0] );
+ }
else {
for ( split( /(\s+)/, $_[0] ) ) {
next unless length $_;
@@ -785,12 +789,13 @@
1;
__END__
+
=pod
=for test_synopsis 1;
__END__
-=for stopwords formatters
+=for stopwords formatters CPAN homepage
=head1 NAME
@@ -798,7 +803,7 @@
=head1 VERSION
-version 2.10
+version 2.11
=head1 SYNOPSIS
@@ -818,18 +823,17 @@
=head1 DESCRIPTION
-HTML::Formatter is a base class for classes that take HTML
-and format it to some output format. When you take an object
-of such a base class and call C<< $formatter->format( $tree ) >>
-with an HTML::TreeBuilder (or HTML::Element) object, they return
-the
-
-HTML formatters are able to format a HTML syntax tree into various
-printable formats. Different formatters produce output for different
-output media. Common for all formatters are that they will return the
-formatted output when the format() method is called. The format()
-method takes a HTML::Element object (usually the HTML::TreeBuilder
-root object) as parameter.
+HTML::Formatter is a base class for classes that take HTML and format it to
+some output format. When you take an object of such a base class and call
+C<$formatter->format( $tree )> with an L (or
+L) object, they return the appropriately formatted string for
+the input HTML.
+
+HTML formatters are able to format a HTML syntax tree into various printable
+formats. Different formatters produce output for different output media.
+Common for all formatters are that they will return the formatted output when
+the format() method is called. The format() method takes a HTML::Element
+object (usually the HTML::TreeBuilder root object) as parameter.
=head1 METHODS
@@ -850,10 +854,10 @@
option1 => value1, option2 => value2, ...
);
-Return a string consisting of the result of using the given class
-to format the given HTML file according to the given (optional) options.
-Internally it calls C<< SomeClass->new( ... )->format( ... ) >> on a new
-HTML::TreeBuilder object based on the given HTML file.
+Return a string consisting of the result of using the given class to format the
+given HTML file according to the given (optional) options. Internally it calls
+C<< SomeClass->new( ... )->format( ... ) >> on a new HTML::TreeBuilder object
+based on the given HTML file.
=head2 format_string
@@ -864,20 +868,19 @@
option1 => value1, option2 => value2, ...
);
-Return a string consisting of the result of using the given class
-to format the given HTML source according to the given (optional)
-options. Internally it calls C<< SomeClass->new( ... )->format( ... ) >>
-on a new HTML::TreeBuilder object based on the given source.
+Return a string consisting of the result of using the given class to format the
+given HTML source according to the given (optional) options. Internally it
+calls C<< SomeClass->new( ... )->format( ... ) >> on a new HTML::TreeBuilder
+object based on the given source.
=head2 format
my $render_string = $formatter->format( $html_tree_object );
-This renders the given HTML object according to the options set for
-$formatter.
+This renders the given HTML object according to the options set for $formatter.
-After you've used a particular formatter object to format a particular
-HTML tree object, you probably should not use either again.
+After you've used a particular formatter object to format a particular HTML
+tree object, you probably should not use either again.
=head1 SEE ALSO
@@ -908,23 +911,16 @@
=head1 BUGS AND LIMITATIONS
-No bugs have been reported.
-
-Please report any bugs or feature requests through the web interface at
-L.
+You can make new bug reports, and view existing ones, through the
+web interface at L.
=head1 AVAILABILITY
-The project homepage is L.
+The project homepage is L.
The latest version of this module is available from the Comprehensive Perl
Archive Network (CPAN). Visit L to find a CPAN
-site near you, or see L.
-
-The development version lives at L
-and may be cloned from L.
-Instead of sending patches, please fork this project using the standard
-git and github infrastructure.
+site near you, or see L.
=head1 AUTHORS
@@ -946,10 +942,9 @@
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2011 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
+This software is copyright (c) 2013 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
-
diff -Nru libhtml-format-perl-2.10/perltidy.LOG libhtml-format-perl-2.11/perltidy.LOG
--- libhtml-format-perl-2.10/perltidy.LOG 1970-01-01 00:00:00.000000000 +0000
+++ libhtml-format-perl-2.11/perltidy.LOG 2013-10-27 20:57:43.000000000 +0000
@@ -0,0 +1,20 @@
+perltidy version 20130806 log file on a darwin system, OLD_PERL_VERSION=5.018001
+Found Configuration File >>> /Users/nigel/Tasks/perl_modules/HTML-Format/.perltidyrc
+Configuration and command line parameters for this run:
+--maximum-line-length=120 -i=4 -ci=4 -vt=2 -cti=0 -pt=1 -sbt=1 -bt=1 -bbt=1 -nsfs -nolq -wbb=% + - * / x != == >= <= =~ < > | & **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x= -asc -aws -tqw -ibc -msc=4 -fpsc=0 -hsc -sbc -nssc -dnl -bbc -bbs -bbb -lbl=8 -bar -nolc -noll -nola -profile=/Users/nigel/Tasks/perl_modules/HTML-Format/.perltidyrc
+To find error messages search for 'WARNING' with your editor
+Indentation will be with 4 spaces
+Line 1 implies starting-indentation-level = 0
+The nesting depths in the table below are at the start of the lines.
+The indicated output line numbers are not always exact.
+ci = levels of continuation indentation; bk = 1 if in BLOCK, 0 if not.
+
+in:out indent c b nesting code + messages; (messages begin with >>>)
+lines levels i k (code begins with one '.' per indent level)
+------ ----- - - -------- -------------------------------------------
+L25:25 i0:0 0 1 { >>>Last line
+
+No indentation disagreement seen
+
+No lines exceeded 120 characters
+ Maximum output line length was 120 at line 24
diff -Nru libhtml-format-perl-2.10/t/00-compile.t libhtml-format-perl-2.11/t/00-compile.t
--- libhtml-format-perl-2.10/t/00-compile.t 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/00-compile.t 2013-10-27 20:57:43.000000000 +0000
@@ -1,59 +1,50 @@
-#!perl
-
use strict;
use warnings;
-use Test::More;
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.033
+use Test::More tests => 5 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
-use File::Find;
-use File::Temp qw{ tempdir };
-my @modules;
-find(
- sub {
- return if $File::Find::name !~ /\.pm\z/;
- my $found = $File::Find::name;
- $found =~ s{^lib/}{};
- $found =~ s{[/\\]}{::}g;
- $found =~ s/\.pm$//;
- # nothing to skip
- push @modules, $found;
- },
- 'lib',
+my @module_files = (
+ 'HTML/FormatMarkdown.pm',
+ 'HTML/FormatPS.pm',
+ 'HTML/FormatRTF.pm',
+ 'HTML/FormatText.pm',
+ 'HTML/Formatter.pm'
);
-my @scripts;
-if ( -d 'bin' ) {
- find(
- sub {
- return unless -f;
- my $found = $File::Find::name;
- # nothing to skip
- push @scripts, $found;
- },
- 'bin',
- );
-}
-my $plan = scalar(@modules) + scalar(@scripts);
-$plan ? (plan tests => $plan) : (plan skip_all => "no tests to run");
-{
- # fake home for cpan-testers
- # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 );
+# no fake home requested
- like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" )
- for sort @modules;
+use File::Spec;
+use IPC::Open3;
+use IO::Handle;
- SKIP: {
- eval "use Test::Script 1.05; 1;";
- skip "Test::Script needed to test script compilation", scalar(@scripts) if $@;
- foreach my $file ( @scripts ) {
- my $script = $file;
- $script =~ s!.*/!!;
- script_compiles( $file, "$script script compiles" );
- }
+my @warnings;
+for my $lib (@module_files)
+{
+ # see L
+ open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
+ my $stderr = IO::Handle->new;
+
+ my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', '-e', "require q[$lib]");
+ binmode $stderr, ':crlf' if $^O eq 'MSWin32';
+ my @_warnings = <$stderr>;
+ waitpid($pid, 0);
+ is($? >> 8, 0, "$lib loaded ok");
+
+ if (@_warnings)
+ {
+ warn @_warnings;
+ push @warnings, @_warnings;
}
}
+
+
+
+is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
+
+
diff -Nru libhtml-format-perl-2.10/t/04_md.t libhtml-format-perl-2.11/t/04_md.t
--- libhtml-format-perl-2.10/t/04_md.t 1970-01-01 00:00:00.000000000 +0000
+++ libhtml-format-perl-2.11/t/04_md.t 2013-10-27 20:57:43.000000000 +0000
@@ -0,0 +1,33 @@
+use strict;
+use warnings;
+use File::Spec; # try to keep pathnames neutral
+use Test::More 0.96;
+
+BEGIN { use_ok("HTML::FormatMarkdown"); }
+
+foreach my $infile ( glob( File::Spec->catfile( 't', 'data', 'in', '*.html' ) ) ) {
+ my $obj = new_ok("HTML::FormatMarkdown");
+ ok( -f $infile, "Testing file handling for $infile" );
+ my $expfilename = ( File::Spec->splitpath($infile) )[2];
+ $expfilename =~ s/\.html$/.md/i;
+ my $expfile = File::Spec->catfile( 't', 'data', 'expected', $expfilename );
+ ok( -f $expfile, ' Expected result file exists' );
+ if ( -f $expfile ) {
+
+ # read file content - split into lines, but we exclude the
+ # doccomm line since it includes a timestamp and version information
+ open( my $fh, '<', $expfile ) or die "Unable to open expected file $expfile - $!\n";
+ my $exp_text = do { local ($/); <$fh> };
+ my $exp_lines = [ split( /\n/, $exp_text ) ];
+
+ # read and convert file
+ my $text = HTML::FormatMarkdown->format_file( $infile, leftmargin => 5, rightmargin => 50 );
+ my $got_lines = [ split( /\n/, $text ) ];
+
+ ok( length($text), ' Returned a string from conversion' );
+ is_deeply( $got_lines, $exp_lines, ' Correct text string returned' );
+ }
+}
+
+# finish up
+done_testing();
diff -Nru libhtml-format-perl-2.10/t/author-pod-spell.t libhtml-format-perl-2.11/t/author-pod-spell.t
--- libhtml-format-perl-2.10/t/author-pod-spell.t 1970-01-01 00:00:00.000000000 +0000
+++ libhtml-format-perl-2.11/t/author-pod-spell.t 2013-10-27 20:57:43.000000000 +0000
@@ -0,0 +1,38 @@
+
+BEGIN {
+ unless ($ENV{AUTHOR_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for testing by the author');
+ }
+}
+
+use strict;
+use warnings;
+use Test::More;
+
+# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006001
+use Test::Spelling 0.12;
+use Pod::Wordlist;
+
+
+add_stopwords();
+all_pod_files_spelling_ok( qw( bin lib ) );
+__DATA__
+Nigel
+Metheringham
+nigelm
+Sean
+Burke
+sburke
+Gisle
+Aas
+gisle
+2002
+1999
+lib
+HTML
+FormatMarkdown
+Formatter
+FormatText
+FormatPS
+FormatRTF
diff -Nru libhtml-format-perl-2.10/t/data/expected/test.md libhtml-format-perl-2.11/t/data/expected/test.md
--- libhtml-format-perl-2.10/t/data/expected/test.md 1970-01-01 00:00:00.000000000 +0000
+++ libhtml-format-perl-2.11/t/data/expected/test.md 2013-10-27 20:57:43.000000000 +0000
@@ -0,0 +1,83 @@
+ # This is a test #
+
+ **This is bold**
+
+ *This is italic*
+
+ `This is teletype`
+
+ - - -
+
+ 1. One
+
+ 2. Two
+
+ This is a quote from Abraham Lincoln:
+ > Four score and seven years ago our fathers
+ > brought forth on this continent, a new
+ > nation, conceived in Liberty, and dedicated
+ > to the proposition that all men are created
+ > equal.
+
+
+ In order to install and use this package you
+ will need Perl version 5.004 or better. You
+ will also need to have the HTML-Tree
+ distribution (version 0.61 or better)
+ installed. If you intend to use the PostScript
+ formatter you need the Font-AFM distribution.
+ All of these should be available from CPAN. In
+ order to install and use this package you will
+ need Perl version 5.004 or better. You will
+ also need to have the HTML-Tree distribution
+ (version 0.61 or better) installed. If you
+ intend to use the PostScript formatter you
+ need the Font-AFM distribution. All of these
+ should be available from CPAN. In order to
+ install and use this package you will need
+ Perl version 5.004 or better. You will also
+ need to have the HTML-Tree distribution
+ (version 0.61 or better) installed. If you
+ intend to use the PostScript formatter you
+ need the Font-AFM distribution. All of these
+ should be available from CPAN.
+
+ In order to install and use this package you
+ will need Perl version 5.004 or better.
+
+ * You will also need to have the HTML-Tree
+ distribution (version 0.61 or better)
+ installed.
+
+ * If you intend to use the PostScript
+ formatter you need the Font-AFM
+ distribution.
+
+ All of these should be available from CPAN.
+
+ In order to install and use this package you
+ will need Perl version 5.004 or better. You
+ will also need to have the HTML-Tree
+ distribution (version 0.61 or better)
+ installed. If you intend to use the PostScript
+ formatter you need the Font-AFM distribution.
+ All of these should be available from CPAN.
+
+ ## Installation ##
+
+ Just follow the usual procedure:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+ In order to install and use this package you
+ will need Perl version 5.004 or better. You
+ will also need to have the HTML-Tree
+ distribution (version 0.61 or better)
+ installed. If you intend to use the PostScript
+ formatter you need the Font-AFM distribution.
+ All of these should be available from CPAN.
+
+ [Byte me dot org](http://byte-me.org)
diff -Nru libhtml-format-perl-2.10/t/data/expected/test.ps libhtml-format-perl-2.11/t/data/expected/test.ps
--- libhtml-format-perl-2.10/t/data/expected/test.ps 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/data/expected/test.ps 2013-10-27 20:57:43.000000000 +0000
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
-%%Creator: HTML::FormatPS (v2.05, using HTML::TreeBuilder v4.1, and HTML::Parser v3.68)
-%%CreationDate: Mon Feb 14 20:03:30 2011
+%%Creator: HTML::FormatPS (v?, using HTML::TreeBuilder v5.03, and HTML::Parser v3.71)
+%%CreationDate: Sat Oct 5 23:48:53 2013
%%Pages: 1
%%PageOrder: Ascend
%%Orientation: Portrait
@@ -8,6 +8,7 @@
%%DocumentNeededResources:
%%+ font Courier
%%+ font Times-Bold
+%%+ font Times-Italic
%%+ font Times-Roman
%%DocumentSuppliedResources: procset newencode 1.0 0
%%+ encoding ISOLatin1Encoding
@@ -86,11 +87,15 @@
%%BeginSetup
ISOLatin1Encoding/Courier-ISO/Courier NE
-/F5/Courier-ISO findfont 10 scalefont def
+/F6/Courier-ISO findfont 10 scalefont def
ISOLatin1Encoding/Times-Bold-ISO/Times-Bold NE
-/F4/Times-Bold-ISO findfont 18 scalefont def
+/F4/Times-Bold-ISO findfont 10 scalefont def
+ISOLatin1Encoding/Times-Bold-ISO/Times-Bold NE
+/F7/Times-Bold-ISO findfont 18 scalefont def
ISOLatin1Encoding/Times-Bold-ISO/Times-Bold NE
/F2/Times-Bold-ISO findfont 24 scalefont def
+ISOLatin1Encoding/Times-Italic-ISO/Times-Italic NE
+/F5/Times-Italic-ISO findfont 10 scalefont def
ISOLatin1Encoding/Times-Roman-ISO/Times-Roman NE
/F3/Times-Roman-ISO findfont 10 scalefont def
ISOLatin1Encoding/Times-Roman-ISO/Times-Roman NE
@@ -107,58 +112,84 @@
F2 SF
(This is a test)S
5.0 683.5 M
+F4 SF
+(This is bold)S
+5.0 662.5 M
+F5 SF
+(This is italic)S
+5.0 641.5 M
+F6 SF
+(This is teletype)S
+newpath 5.0 630.5 M 545.3 630.5 lineto stroke
+27.0 610.5 M
F3 SF
+(One)S
+16.0 (1.) stringwidth pop sub 6.2 add 610.5 M
+(1.)S
+27.0 589.5 M
+(Two)S
+16.0 (2.) stringwidth pop sub 6.2 add 589.5 M
+(2.)S
+5.0 568.5 M
+(This is a quote from Abraham Lincoln:)S
+16.0 547.5 M
+(Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to)S
+16.0 536.5 M
+(the proposition that all men are created equal.)S
+5.0 515.5 M
(In order to install and use this package you will need Perl version 5.004 or better. You will also need to have the HTML-Tree)S
-5.0 672.5 M
+5.0 504.5 M
(distribution \(version 0.61 or better\) installed. If you intend to use the PostScript formatter you need the Font-AFM distribution. All of)S
-5.0 661.5 M
+5.0 493.5 M
(these should be available from CPAN. In order to install and use this package you will need Perl version 5.004 or better. You will also)S
-5.0 650.5 M
+5.0 482.5 M
(need to have the HTML-Tree distribution \(version 0.61 or better\) installed. If you intend to use the PostScript formatter you need the)S
-5.0 639.5 M
+5.0 471.5 M
(Font-AFM distribution. All of these should be available from CPAN. In order to install and use this package you will need Perl)S
-5.0 628.5 M
+5.0 460.5 M
(version 5.004 or better. You will also need to have the HTML-Tree distribution \(version 0.61 or better\) installed. If you intend to use)S
-5.0 617.5 M
+5.0 449.5 M
(the PostScript formatter you need the Font-AFM distribution. All of these should be available from CPAN.)S
-5.0 596.5 M
+5.0 428.5 M
(In order to install and use this package you will need Perl version 5.004 or better.)S
-27.0 575.5 M
+27.0 407.5 M
(You will also need to have the HTML-Tree distribution \(version 0.61 or better\) installed.)S
-newpath 17.2 578.0 1.2 0 360 arc fill
-27.0 554.5 M
+newpath 17.2 410.0 1.2 0 360 arc fill
+27.0 386.5 M
(If you intend to use the PostScript formatter you need the Font-AFM distribution.)S
-newpath 17.2 557.0 1.2 0 360 arc fill
-5.0 533.5 M
+newpath 17.2 389.0 1.2 0 360 arc fill
+5.0 365.5 M
(All of these should be available from CPAN.)S
-5.0 512.5 M
+5.0 344.5 M
(In order to install and use this package you will need Perl version 5.004 or better. You will also need to have the HTML-Tree)S
-5.0 501.5 M
+5.0 333.5 M
(distribution \(version 0.61 or better\) installed. If you intend to use the PostScript formatter you need the Font-AFM distribution. All of)S
-5.0 490.5 M
+5.0 322.5 M
(these should be available from CPAN.)S
-5.0 444.7 M
-F4 SF
+5.0 276.7 M
+F7 SF
(Installation)S
-5.0 423.7 M
+5.0 255.7 M
F3 SF
(Just follow the usual procedure:)S
-5.0 402.7 M
-F5 SF
-( perl Makefile.PL)S
-5.0 391.7 M
-( make)S
-5.0 380.7 M
-( make test)S
-5.0 369.7 M
-( make install)S
-5.0 348.7 M
+5.0 234.7 M
+F6 SF
+(perl Makefile.PL)S
+5.0 223.7 M
+(make)S
+5.0 212.7 M
+(make test)S
+5.0 201.7 M
+(make install)S
+5.0 180.7 M
F3 SF
(In order to install and use this package you will need Perl version 5.004 or better. You will also need to have the HTML-Tree)S
-5.0 337.7 M
+5.0 169.7 M
(distribution \(version 0.61 or better\) installed. If you intend to use the PostScript formatter you need the Font-AFM distribution. All of)S
-5.0 326.7 M
+5.0 158.7 M
(these should be available from CPAN.)S
+5.0 137.7 M
+(Byte me dot org)S
showpage
%%Trailer
diff -Nru libhtml-format-perl-2.10/t/data/expected/test.rtf libhtml-format-perl-2.11/t/data/expected/test.rtf
--- libhtml-format-perl-2.10/t/data/expected/test.rtf 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/data/expected/test.rtf 2013-10-27 20:57:43.000000000 +0000
@@ -24,7 +24,7 @@
}
{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
-{\info{\doccomm generated by HTML::FormatRTF (v2.04, using HTML::TreeBuilder v4.1, and HTML::Parser v3.68)}
+{\info{\doccomm generated by HTML::FormatRTF (v?, using HTML::TreeBuilder v5.03, and HTML::Parser v3.71)}
{\author [see doc]}{\company [see doc]}{\operator [see doc]}
}
@@ -44,6 +44,42 @@
\par}
{\pard\sa220\li0\ri0\ql\plain
+{\b This is bold}
+\par}
+
+{\pard\sa220\li0\ri0\ql\plain
+{\i This is italic}
+\par}
+
+{\pard\sa220\li0\ri0\ql\plain
+{\f1\noproof\lang1024\lang1076 This is teletype}
+\par}
+
+{\pard\sa154\li0\ri0\ql\plain
+\qc\ul\f1\fs20\nocheck\lang1024 \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
+\par}
+
+{\pard\sa220\li440\ri0\ql\plain
+\fi-99
+1.. One
+\par}
+
+{\pard\sa220\li440\ri0\ql\plain
+\fi-99
+2.. Two
+\par}
+
+{\pard\sa220\li0\ri0\ql\plain
+This is a quote from Abraham Lincoln:
+\par}
+
+{\pard\sa220\li220\ri220\ql\plain
+\'46our score and seven years ago our fathers brought forth on this
+continent, a new nation, conceived in Liberty, and dedicated to the
+proposition that all men are created equal.
+\par}
+
+{\pard\sa220\li0\ri0\ql\plain
In order to install and use this package you will need Perl version
5.004 or better. You will also need to have the HTML\_Tree distribution
(version 0.61 or better) installed. If you intend to use the PostScript
@@ -99,10 +135,10 @@
\par}
{\pard\sa220\li0\ri0\ql\plain
-\s20\f1\fs18\noproof\lang1024\lang1076 perl Makefile.PL\line
- make\line
- make test\line
- make install
+\s20\f1\fs18\noproof\lang1024\lang1076 perl Makefile.PL\line
+make\line
+make test\line
+make install
\par}
{\pard\sa220\li0\ri0\ql\plain
@@ -113,4 +149,8 @@
should be available from CPAN.
\par}
+{\pard\sa220\li0\ri0\ql\plain
+Byte me dot org
+\par}
+
}
\ No newline at end of file
diff -Nru libhtml-format-perl-2.10/t/data/expected/test.txt libhtml-format-perl-2.11/t/data/expected/test.txt
--- libhtml-format-perl-2.10/t/data/expected/test.txt 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/data/expected/test.txt 2013-10-27 20:57:43.000000000 +0000
@@ -1,6 +1,26 @@
This is a test
==============
+ This is bold
+
+ This is italic
+
+ This is teletype
+
+ ---------------------------------------------
+
+ 1. One
+
+ 2. Two
+
+ This is a quote from Abraham Lincoln:
+
+ Four score and seven years ago our fathers
+ brought forth on this continent, a new
+ nation, conceived in Liberty, and
+ dedicated to the proposition that all men
+ are created equal.
+
In order to install and use this package you
will need Perl version 5.004 or better. You
will also need to have the HTML-Tree
@@ -50,10 +70,10 @@
Just follow the usual procedure:
- perl Makefile.PL
- make
- make test
- make install
+ perl Makefile.PL
+ make
+ make test
+ make install
In order to install and use this package you
will need Perl version 5.004 or better. You
@@ -62,3 +82,5 @@
installed. If you intend to use the PostScript
formatter you need the Font-AFM distribution.
All of these should be available from CPAN.
+
+ Byte me dot org
diff -Nru libhtml-format-perl-2.10/t/data/in/test.html libhtml-format-perl-2.11/t/data/in/test.html
--- libhtml-format-perl-2.10/t/data/in/test.html 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/data/in/test.html 2013-10-27 20:57:43.000000000 +0000
@@ -3,6 +3,26 @@
This is a test
+This is bold
+
+This is italic
+
+This is teletype
+
+
+
+
+ - One
+ - Two
+
+
+This is a quote from Abraham Lincoln:
+
+Four score and seven years ago our fathers brought forth on this
+continent, a new nation, conceived in Liberty, and dedicated to
+the proposition that all men are created equal.
+
+
In order to install and use this package you will need Perl version
5.004 or better. You will also need to have the HTML-Tree
distribution (version 0.61 or better) installed. If you intend to use
@@ -42,10 +62,10 @@
Just follow the usual procedure:
- perl Makefile.PL
- make
- make test
- make install
+perl Makefile.PL
+make
+make test
+make install
In order to install and use this package you will need Perl version
@@ -54,4 +74,5 @@
the PostScript formatter you need the Font-AFM distribution. All of
these should be available from CPAN.
+
Byte me dot org
diff -Nru libhtml-format-perl-2.10/t/release-no-tabs.t libhtml-format-perl-2.11/t/release-no-tabs.t
--- libhtml-format-perl-2.10/t/release-no-tabs.t 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/release-no-tabs.t 2013-10-27 20:57:43.000000000 +0000
@@ -8,9 +8,19 @@
use strict;
use warnings;
-use Test::More;
-eval 'use Test::NoTabs';
-plan skip_all => 'Test::NoTabs required' if $@;
+# this test was generated with Dist::Zilla::Plugin::NoTabsTests 0.04
-all_perl_files_ok();
+use Test::More 0.88;
+use Test::NoTabs;
+
+my @files = (
+ 'lib/HTML/FormatMarkdown.pm',
+ 'lib/HTML/FormatPS.pm',
+ 'lib/HTML/FormatRTF.pm',
+ 'lib/HTML/FormatText.pm',
+ 'lib/HTML/Formatter.pm'
+);
+
+notabs_ok($_) foreach @files;
+done_testing;
diff -Nru libhtml-format-perl-2.10/t/release-pod-spell.t libhtml-format-perl-2.11/t/release-pod-spell.t
--- libhtml-format-perl-2.10/t/release-pod-spell.t 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/release-pod-spell.t 1970-01-01 00:00:00.000000000 +0000
@@ -1,30 +0,0 @@
-#!perl
-
-BEGIN {
- unless ($ENV{RELEASE_TESTING}) {
- require Test::More;
- Test::More::plan(skip_all => 'these tests are for release candidate testing');
- }
-}
-
-
-use Test::More;
-
-eval "use Pod::Wordlist::hanekomu";
-plan skip_all => "Pod::Wordlist::hanekomu required for testing POD spelling"
- if $@;
-
-eval "use Test::Spelling 0.12";
-plan skip_all => "Test::Spelling 0.12 required for testing POD spelling"
- if $@;
-
-
-add_stopwords();
-all_pod_files_spelling_ok('lib');
-__DATA__
-Nigel
-Metheringham
-Sean
-Burke
-Gisle
-Aas
diff -Nru libhtml-format-perl-2.10/t/release-portability.t libhtml-format-perl-2.11/t/release-portability.t
--- libhtml-format-perl-2.10/t/release-portability.t 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/release-portability.t 2013-10-27 20:57:43.000000000 +0000
@@ -8,9 +8,12 @@
}
+use strict;
+use warnings;
+
use Test::More;
-eval "use Test::Portability::Files";
-plan skip_all => "Test::Portability::Files required for testing portability"
- if $@;
+eval 'use Test::Portability::Files';
+plan skip_all => 'Test::Portability::Files required for testing portability'
+ if $@;
run_tests();
diff -Nru libhtml-format-perl-2.10/t/release-synopsis.t libhtml-format-perl-2.11/t/release-synopsis.t
--- libhtml-format-perl-2.10/t/release-synopsis.t 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/release-synopsis.t 2013-10-27 20:57:43.000000000 +0000
@@ -13,4 +13,4 @@
eval "use Test::Synopsis";
plan skip_all => "Test::Synopsis required for testing synopses"
if $@;
-all_synopsis_ok('lib');
+all_synopsis_ok();
diff -Nru libhtml-format-perl-2.10/t/rt69426.t libhtml-format-perl-2.11/t/rt69426.t
--- libhtml-format-perl-2.10/t/rt69426.t 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/rt69426.t 2013-10-27 20:57:43.000000000 +0000
@@ -25,42 +25,42 @@
};
foreach my $quoted ( sort { $a cmp $b } keys %{$table} ) {
- my $desc = $table->{$quoted};
- my $obj = new_ok("HTML::FormatPS");
- my $htree = new_ok("HTML::TreeBuilder");
-
- my $html = 'The ' . $desc . ' is a ' . $quoted . ' character';
- ok( $html, "HTML string containing an $desc should map to $desc" );
-
- ok( $htree->parse_content($html), ' Parse HTML content' );
-
- my $result = $obj->format_string($html);
- ok( $result, ' Converted HTML object' );
-
- # count high bit characters
- my $count;
- {
- use bytes;
- if ( $quoted eq '£' ) {
-
- # we must exclude latin1 pound - char \243
- $count = $result =~ tr/\177-\242\244-\377//;
- }
- else {
- $count = $result =~ tr/\177-\377//;
- }
+ my $desc = $table->{$quoted};
+ my $obj = new_ok("HTML::FormatPS");
+ my $htree = new_ok("HTML::TreeBuilder");
+
+ my $html = 'The ' . $desc . ' is a ' . $quoted . ' character';
+ ok( $html, "HTML string containing an $desc should map to $desc" );
+
+ ok( $htree->parse_content($html), ' Parse HTML content' );
+
+ my $result = $obj->format_string($html);
+ ok( $result, ' Converted HTML object' );
+
+ # count high bit characters
+ my $count;
+ {
+ use bytes;
+ if ( $quoted eq '£' ) {
+
+ # we must exclude latin1 pound - char \243
+ $count = $result =~ tr/\177-\242\244-\377//;
+ }
+ else {
+ $count = $result =~ tr/\177-\377//;
}
+ }
- ok( ( $count == 0 ), ' No unexpected high-bit characters found' );
+ ok( ( $count == 0 ), ' No unexpected high-bit characters found' );
- ## # stuff postscript out into file - uncomment if you need for debugging
- ## my $fn = $quoted;
- ## $fn =~ tr/a-z//cd;
- ## $fn .= '.ps';
- ## write_file( $fn, { binmode => ':raw' }, $result );
+ ## # stuff postscript out into file - uncomment if you need for debugging
+ ## my $fn = $quoted;
+ ## $fn =~ tr/a-z//cd;
+ ## $fn .= '.ps';
+ ## write_file( $fn, { binmode => ':raw' }, $result );
- ## # tell details about errors - uncomment if needed
- ## diag( dump( { orig => $html, dump => $htree->dump, result => $result } ) ) if ($count);
+ ## # tell details about errors - uncomment if needed
+ ## diag( dump( { orig => $html, dump => $htree->dump, result => $result } ) ) if ($count);
}
# finish up
diff -Nru libhtml-format-perl-2.10/t/support/generate_results.pl libhtml-format-perl-2.11/t/support/generate_results.pl
--- libhtml-format-perl-2.10/t/support/generate_results.pl 2011-07-18 16:07:49.000000000 +0000
+++ libhtml-format-perl-2.11/t/support/generate_results.pl 2013-10-27 20:57:43.000000000 +0000
@@ -13,10 +13,13 @@
use HTML::FormatRTF;
use HTML::FormatPS;
use HTML::FormatText;
+use HTML::FormatMarkdown;
foreach my $infile ( glob( File::Spec->catfile( 't', 'data', 'in', '*.html' ) ) ) {
- my $outfile = substr( File::Spec->catfile( 't', 'data', 'expected', ( File::Spec->splitpath($infile) )[2] ), 0, -4 );
+ my $outfile =
+ substr( File::Spec->catfile( 't', 'data', 'expected', ( File::Spec->splitpath($infile) )[2] ), 0, -4 );
write_file( ( $outfile . 'ps' ), HTML::FormatPS->format_file( $infile, leftmargin => 5, rightmargin => 50 ) );
write_file( ( $outfile . 'rtf' ), HTML::FormatRTF->format_file( $infile, leftmargin => 5, rightmargin => 50 ) );
write_file( ( $outfile . 'txt' ), HTML::FormatText->format_file( $infile, leftmargin => 5, rightmargin => 50 ) );
+ write_file( ( $outfile . 'md' ), HTML::FormatMarkdown->format_file( $infile, leftmargin => 5, rightmargin => 50 ) );
}