r65517 - in /trunk/libhtml-formattext-withlinks-perl: ./ debian/ debian/source/ lib/HTML/FormatText/ t/

ansgar at users.alioth.debian.org ansgar at users.alioth.debian.org
Sat Dec 4 11:31:56 UTC 2010


Author: ansgar
Date: Sat Dec  4 11:31:48 2010
New Revision: 65517

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=65517
Log:
* New upstream release.
* Use Build.PL by switching to debhelper compat level 8.
* Use source format 3.0 (quilt).
* Make build-dep on perl unversioned.
* debian/copyright: Update for new upstream release; formatting changes.
* Bump Standards-Version to 3.9.1.
* Add myself to Uploaders.

Added:
    trunk/libhtml-formattext-withlinks-perl/debian/source/
    trunk/libhtml-formattext-withlinks-perl/debian/source/format
    trunk/libhtml-formattext-withlinks-perl/t/basic_parse.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/basic_parse.t
    trunk/libhtml-formattext-withlinks-perl/t/custom_format.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/custom_format.t
    trunk/libhtml-formattext-withlinks-perl/t/no_html_passed.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/no_html_passed.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_a_with_no_href.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_a_with_no_href.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_file.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_file.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_missing_file.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_missing_file.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_multiple_times.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_multiple_times.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_with_base.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_with_base.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_with_html_fragment.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_with_html_fragment.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_with_identical_links.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_with_identical_links.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_with_links.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_with_links.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_with_local_links.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_with_local_links.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_with_name.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_with_name.t
    trunk/libhtml-formattext-withlinks-perl/t/parse_with_relative_links.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/parse_with_relative_links.t
    trunk/libhtml-formattext-withlinks-perl/t/pod.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/pod.t
    trunk/libhtml-formattext-withlinks-perl/t/podcover.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/podcover.t
    trunk/libhtml-formattext-withlinks-perl/t/treebuilder_problem.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/treebuilder_problem.t
    trunk/libhtml-formattext-withlinks-perl/t/with_emphasis.t
      - copied unchanged from r65516, branches/upstream/libhtml-formattext-withlinks-perl/current/t/with_emphasis.t
Removed:
    trunk/libhtml-formattext-withlinks-perl/t/02_basic_parse.t
    trunk/libhtml-formattext-withlinks-perl/t/03_parse_with_links.t
    trunk/libhtml-formattext-withlinks-perl/t/04_parse_with_relative_links.t
    trunk/libhtml-formattext-withlinks-perl/t/05_parse_with_html_fragment.t
    trunk/libhtml-formattext-withlinks-perl/t/06_parse_file.t
    trunk/libhtml-formattext-withlinks-perl/t/07_parse_missing_file.t
    trunk/libhtml-formattext-withlinks-perl/t/08_custom_format.t
    trunk/libhtml-formattext-withlinks-perl/t/09_with_emphasis.t
    trunk/libhtml-formattext-withlinks-perl/t/10_no_html_passed.t
    trunk/libhtml-formattext-withlinks-perl/t/11_parse_a_with_no_href.t
    trunk/libhtml-formattext-withlinks-perl/t/12_treebuilder_problem.t
    trunk/libhtml-formattext-withlinks-perl/t/13_parse_with_name.t
    trunk/libhtml-formattext-withlinks-perl/t/14_parse_with_identical_links.t
    trunk/libhtml-formattext-withlinks-perl/t/15_parse_with_local_links.t
    trunk/libhtml-formattext-withlinks-perl/t/16_parse_multiple_times.t
    trunk/libhtml-formattext-withlinks-perl/t/98_pod.t
    trunk/libhtml-formattext-withlinks-perl/t/99_podcover.t
Modified:
    trunk/libhtml-formattext-withlinks-perl/Build.PL
    trunk/libhtml-formattext-withlinks-perl/Changes
    trunk/libhtml-formattext-withlinks-perl/MANIFEST
    trunk/libhtml-formattext-withlinks-perl/META.yml
    trunk/libhtml-formattext-withlinks-perl/Makefile.PL
    trunk/libhtml-formattext-withlinks-perl/debian/changelog
    trunk/libhtml-formattext-withlinks-perl/debian/compat
    trunk/libhtml-formattext-withlinks-perl/debian/control
    trunk/libhtml-formattext-withlinks-perl/debian/copyright
    trunk/libhtml-formattext-withlinks-perl/lib/HTML/FormatText/WithLinks.pm
    trunk/libhtml-formattext-withlinks-perl/t/01load.t

Modified: trunk/libhtml-formattext-withlinks-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/Build.PL?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/Build.PL (original)
+++ trunk/libhtml-formattext-withlinks-perl/Build.PL Sat Dec  4 11:31:48 2010
@@ -6,7 +6,7 @@
         module_name =>  "HTML::FormatText::WithLinks",
         license     =>  'perl',
         requires    =>  {
-                            'HTML::FormatText'    =>  0,
+                            'HTML::FormatText'    =>  2,
                             'HTML::TreeBuilder'   =>  0,
                             'URI::WithBase'       =>  0,  
         },

Modified: trunk/libhtml-formattext-withlinks-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/Changes?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/Changes (original)
+++ trunk/libhtml-formattext-withlinks-perl/Changes Sat Dec  4 11:31:48 2010
@@ -1,5 +1,11 @@
 # Changelog for HTML::FormatText::WithLinks
-version:    0.10
+version:    0.12
+date:       27/11/2010       
+    Updated HTML::FormatText dependancy to require version 2+
+    Added code to pull out the base from the base element in a document <Kevin Ryde> (rt #55238)
+    Added code to optionally skip links where the text is the same as the HREF <Thomas Sibley> (rt #63236)
+---
+version:    0.11
 date:       30/07/2008
     failed to actually include any of the mentioned things in the previous release so re-releasing with the things actually there. sigh.
 ---

Modified: trunk/libhtml-formattext-withlinks-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/MANIFEST?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/MANIFEST (original)
+++ trunk/libhtml-formattext-withlinks-perl/MANIFEST Sat Dec  4 11:31:48 2010
@@ -9,21 +9,22 @@
 META.yml
 README
 t/01load.t
-t/02_basic_parse.t
-t/03_parse_with_links.t
-t/04_parse_with_relative_links.t
-t/05_parse_with_html_fragment.t
-t/06_parse_file.t
-t/07_parse_missing_file.t
-t/08_custom_format.t
-t/09_with_emphasis.t
-t/10_no_html_passed.t
-t/11_parse_a_with_no_href.t
-t/12_treebuilder_problem.t
-t/13_parse_with_name.t
-t/14_parse_with_identical_links.t
-t/15_parse_with_local_links.t
-t/16_parse_multiple_times.t
-t/98_pod.t
-t/99_podcover.t
+t/basic_parse.t
+t/custom_format.t
 t/file.html
+t/no_html_passed.t
+t/parse_a_with_no_href.t
+t/parse_file.t
+t/parse_missing_file.t
+t/parse_multiple_times.t
+t/parse_with_base.t
+t/parse_with_html_fragment.t
+t/parse_with_identical_links.t
+t/parse_with_links.t
+t/parse_with_local_links.t
+t/parse_with_name.t
+t/parse_with_relative_links.t
+t/pod.t
+t/podcover.t
+t/treebuilder_problem.t
+t/with_emphasis.t

Modified: trunk/libhtml-formattext-withlinks-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/META.yml?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/META.yml (original)
+++ trunk/libhtml-formattext-withlinks-perl/META.yml Sat Dec  4 11:31:48 2010
@@ -1,29 +1,28 @@
 ---
-name: HTML-FormatText-WithLinks
-version: 0.11
+abstract: 'HTML to text conversion with links as footnotes'
 author:
   - 'Struan Donald. E<lt>struan at cpan.orgE<gt>'
-  - |-
-    Ian Malpass E<lt>ian at indecorous.comE<gt> was responsible for the custom 
-    formatting bits and the nudge to release the code.
-  - |-
-    Simon Dassow E<lt>janus at errornet.de<gt> for the anchor_links option plus 
-    a few bugfixes and optimsations
-abstract: HTML to text conversion with links as footnotes
-license: perl
-resources:
-  license: http://dev.perl.org/licenses/
-requires:
-  HTML::FormatText: 0
-  HTML::TreeBuilder: 0
-  URI::WithBase: 0
+  - "Ian Malpass E<lt>ian at indecorous.comE<gt> was responsible for the custom \nformatting bits and the nudge to release the code."
+  - "Simon Dassow E<lt>janus at errornet.de<gt> for the anchor_links option plus \na few bugfixes and optimisations"
+  - 'Thomas Sibley E<lt>trs at bestpractical.comE<gt> for the skip linked urls code.'
 build_requires:
   Test::More: 0
+configure_requires:
+  Module::Build: 0.36
+generated_by: 'Module::Build version 0.3603'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: HTML-FormatText-WithLinks
 provides:
   HTML::FormatText::WithLinks:
     file: lib/HTML/FormatText/WithLinks.pm
-    version: 0.11
-generated_by: Module::Build version 0.280801
-meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.2.html
-  version: 1.2
+    version: 0.12
+requires:
+  HTML::FormatText: 2
+  HTML::TreeBuilder: 0
+  URI::WithBase: 0
+resources:
+  license: http://dev.perl.org/licenses/
+version: 0.12

Modified: trunk/libhtml-formattext-withlinks-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/Makefile.PL?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/Makefile.PL (original)
+++ trunk/libhtml-formattext-withlinks-perl/Makefile.PL Sat Dec  4 11:31:48 2010
@@ -1,11 +1,11 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01
+# Note: this file was auto-generated by Module::Build::Compat version 0.3603
 use ExtUtils::MakeMaker;
 WriteMakefile
 (
           'NAME' => 'HTML::FormatText::WithLinks',
           'VERSION_FROM' => 'lib/HTML/FormatText/WithLinks.pm',
           'PREREQ_PM' => {
-                           'HTML::FormatText' => 0,
+                           'HTML::FormatText' => 2,
                            'HTML::TreeBuilder' => 0,
                            'Test::More' => 0,
                            'URI::WithBase' => 0

Modified: trunk/libhtml-formattext-withlinks-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/debian/changelog?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/debian/changelog (original)
+++ trunk/libhtml-formattext-withlinks-perl/debian/changelog Sat Dec  4 11:31:48 2010
@@ -1,8 +1,18 @@
-libhtml-formattext-withlinks-perl (0.11-3) UNRELEASED; urgency=low
+libhtml-formattext-withlinks-perl (0.12-1) UNRELEASED; urgency=low
 
+  [ Tim Retout ]
   * debian/control: Update my email address.
 
- -- Tim Retout <diocles at debian.org>  Sun, 24 Oct 2010 21:52:58 +0100
+  [ Ansgar Burchardt ]
+  * New upstream release.
+  * Use Build.PL by switching to debhelper compat level 8.
+  * Use source format 3.0 (quilt).
+  * Make build-dep on perl unversioned.
+  * debian/copyright: Update for new upstream release; formatting changes.
+  * Bump Standards-Version to 3.9.1.
+  * Add myself to Uploaders.
+
+ -- Ansgar Burchardt <ansgar at debian.org>  Sat, 04 Dec 2010 12:23:36 +0100
 
 libhtml-formattext-withlinks-perl (0.11-2) unstable; urgency=low
 

Modified: trunk/libhtml-formattext-withlinks-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/debian/compat?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/debian/compat (original)
+++ trunk/libhtml-formattext-withlinks-perl/debian/compat Sat Dec  4 11:31:48 2010
@@ -1,1 +1,1 @@
-7
+8

Modified: trunk/libhtml-formattext-withlinks-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/debian/control?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/debian/control (original)
+++ trunk/libhtml-formattext-withlinks-perl/debian/control Sat Dec  4 11:31:48 2010
@@ -1,11 +1,11 @@
 Source: libhtml-formattext-withlinks-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 7)
-Build-Depends-Indep: perl (>= 5.6.10-12), liburi-perl, libhtml-tree-perl, libhtml-format-perl, libtest-mockobject-perl, libtest-pod-perl, libtest-pod-coverage-perl
+Build-Depends: debhelper (>= 8)
+Build-Depends-Indep: perl, liburi-perl, libhtml-tree-perl, libhtml-format-perl, libtest-mockobject-perl, libtest-pod-perl, libtest-pod-coverage-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Tim Retout <diocles at debian.org>
-Standards-Version: 3.8.2
+Uploaders: Tim Retout <diocles at debian.org>, Ansgar Burchardt <ansgar at debian.org>
+Standards-Version: 3.9.1
 Homepage: http://search.cpan.org/dist/HTML-FormatText-WithLinks/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libhtml-formattext-withlinks-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/

Modified: trunk/libhtml-formattext-withlinks-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/debian/copyright?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/debian/copyright (original)
+++ trunk/libhtml-formattext-withlinks-perl/debian/copyright Sat Dec  4 11:31:48 2010
@@ -1,25 +1,31 @@
-Format-Specification:
-    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=226
-Upstream-Name: HTML-FormatText-WithLinks
-Upstream-Maintainer: Struan Donald <struan at cpan.org>
-Upstream-Source: http://search.cpan.org/dist/HTML-FormatText-WithLinks/
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Name: HTML-FormatText-WithLinks
+Maintainer: Struan Donald <struan at cpan.org>
+Source: http://search.cpan.org/dist/HTML-FormatText-WithLinks/
 
 Files: *
-Copyright: Copyright (C) 2003 Struan Donald and Ian Malpass.
-	   All rights reserved.
-License: GPL-1+ | Artistic
- This program is free software; you can redistribute
- it and/or modify it under the same terms as Perl itself.
- .
- Perl is distributed under the GNU General Public License, either version 1 or
- (at your option) any later version, and the Artistic License.
- .
- On Debian systems, the complete text of the GNU General Public License can be
- found in /usr/share/common-licenses/GPL and the Artistic License in
- /usr/share/common-licenses/Artistic.
+Copyright: 2003-2010, Struan Donald and Ian Malpass
+License: Artistic or GPL-1+
 
 Files: debian/*
-Copyright: Copyright 2008, 2009 Tim Retout <tim at retout.co.uk>
- 2008, gregor herrmann <gregoa at debian.org>
- 2008, Nathan Handler <nhandler at ubuntu.com>
-License: GPL-1+ | Artistic
+Copyright:
+ 2008-2009, Tim Retout <tim at retout.co.uk>
+ 2008,      gregor herrmann <gregoa at debian.org>
+ 2008,      Nathan Handler <nhandler at ubuntu.com>
+License: Artistic or GPL-1+
+
+License: Artistic
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian systems, the complete text of the Artistic License can be
+ found in `/usr/share/common-licenses/Artistic'.
+
+License: GPL-1+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ .
+ On Debian systems, the complete text of version 1 of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-1'.

Added: trunk/libhtml-formattext-withlinks-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/debian/source/format?rev=65517&op=file
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/debian/source/format (added)
+++ trunk/libhtml-formattext-withlinks-perl/debian/source/format Sat Dec  4 11:31:48 2010
@@ -1,0 +1,1 @@
+3.0 (quilt)

Modified: trunk/libhtml-formattext-withlinks-perl/lib/HTML/FormatText/WithLinks.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/lib/HTML/FormatText/WithLinks.pm?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/lib/HTML/FormatText/WithLinks.pm (original)
+++ trunk/libhtml-formattext-withlinks-perl/lib/HTML/FormatText/WithLinks.pm Sat Dec  4 11:31:48 2010
@@ -6,7 +6,7 @@
 use base qw(HTML::FormatText);
 use vars qw($VERSION);
 
-$VERSION = '0.11';
+$VERSION = '0.12';
 
 sub new {
 
@@ -29,6 +29,9 @@
     delete $hash->{base};
     $self->{base} =~ s#(.*?)/[^/]*$#$1/# if $self->{base};
 
+    $self->{doc_overrides_base} = $hash->{doc_overrides_base};
+    delete $hash->{doc_overrides_base};
+
     $self->{before_link} = '[%n]';
     $self->{after_link} = '';
     $self->{footnote} = '%n. %l';
@@ -38,10 +41,12 @@
 
     $self->{anchor_links} = 1;
 
+    $self->{skip_linked_urls} = 0;
+
     $self->{_link_track} = {};
 
     foreach ( qw( before_link after_link footnote link_num_generator 
-                  with_emphasis unique_links anchor_links ) ) {
+                  with_emphasis unique_links anchor_links skip_linked_urls ) ) {
         $self->{ $_ } = $hash->{ $_ } if exists $hash->{ $_ };
         delete $hash->{ $_ };
     }
@@ -59,6 +64,38 @@
     $self->SUPER::textflow(@_);
 }
 
+sub head_start {
+    my ($self) = @_;
+    $self->SUPER::head_start();
+
+    # we don't care about what the documens says it's base is
+    if ( $self->{base} and not $self->{doc_overrides_base} ) {
+        return 0;
+    }
+
+    # descend into <head> for possible <base> there, even if superclass not
+    # interested (as of HTML::FormatText 2.04 it's not)
+    return 1;
+}
+
+# <base> is supposed to be inside <head>, but no need to demand that.
+# "lynx -source" sticks a <base> at the very start of the document, before
+# even <html>, so accepting <base> anywhere lets that work.
+sub base_start {
+    my ($self, $node) = @_;
+    if (my $href = $node->attr('href')) {
+        $self->{base} = $href;
+    }
+
+    # allow for no superclass base_start() in HTML::FormatText 2.04
+    if (! HTML::FormatText->can('base_start')) {
+        return 0;
+    }
+
+    # chain up if it exists in the future
+    return $self->SUPER::base_start();
+}
+
 sub a_start {
 
     my $self = shift;
@@ -66,6 +103,9 @@
     # local urls are no use so we have to make them absolute
     my $href = $node->attr('href') || '';
     if ($href && $self->{anchor_links} == 0 && $href =~ m/^#/o) {
+        $href = '';
+    }
+    elsif ($href and $self->{skip_linked_urls} and $href eq $node->as_text) {
         $href = '';
     }
     if ( $href ) {
@@ -96,18 +136,20 @@
     my $self = shift;
     my $node = shift;
     my $text;
-    if ($self->{unique_links})
-    {
-        my $href = $node->attr('href');
-        $text = $self->text('after_link', $self->{_link_track}->{$href}, $href);
-    } else {
-        $text = $self->text('after_link');
-    }
+    unless ($self->{skip_linked_urls} and $node->attr('href') eq $node->as_text) {
+        if ($self->{unique_links})
+        {
+            my $href = $node->attr('href');
+            $text = $self->text('after_link', $self->{_link_track}->{$href}, $href);
+        } else {
+            $text = $self->text('after_link');
+        }
 # If we're just dealing with a fragment of HTML, with a link at the
 # end, we get a space before the first footnote link if we do 
 # $self->out( '' )
-    if ($text ne '') {
-        $self->out( $text );
+        if ($text ne '') {
+            $self->out( $text );
+        }
     }
     $self->SUPER::a_end();
 
@@ -321,6 +363,12 @@
 a base option. This should be set to a URI which will be used to turn any 
 relative URIs on the HTML to absolute ones.
 
+=item doc_overrides_base
+
+If a base element is found in the document and it has an href attribute
+then setting doc_overrides_base to true will cause the document's base
+to be used. This defaults to false.
+
 =item before_link (default: '[%n]')
 
 =item after_link (default: '')
@@ -352,6 +400,11 @@
 =item anchor_links
 
 If set to 0 then links pointing to local anchors will be skipped.
+The default behaviour is to include all links.
+
+=item skip_linked_urls
+
+If set to 1, then links where the text equals the href value will be skipped.
 The default behaviour is to include all links.
 
 =back
@@ -401,11 +454,17 @@
 formatting bits and the nudge to release the code.
 
 Simon Dassow E<lt>janus at errornet.de<gt> for the anchor_links option plus 
-a few bugfixes and optimsations
+a few bugfixes and optimisations
+
+Kevin Ryde for the code for pulling the base out the document.
+
+Thomas Sibley E<lt>trs at bestpractical.comE<gt> for the skip linked urls code.
 
 =head1 COPYRIGHT
 
-Copyright (C) 2003 Struan Donald and Ian Malpass. All rights reserved.
+Copyright (C) 2003-2010 Struan Donald and Ian Malpass. All rights reserved.
+
+=head1 LICENSE
 
 This program is free software; you can redistribute
 it and/or modify it under the same terms as Perl itself.

Modified: trunk/libhtml-formattext-withlinks-perl/t/01load.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-formattext-withlinks-perl/t/01load.t?rev=65517&op=diff
==============================================================================
--- trunk/libhtml-formattext-withlinks-perl/t/01load.t (original)
+++ trunk/libhtml-formattext-withlinks-perl/t/01load.t Sat Dec  4 11:31:48 2010
@@ -1,4 +1,4 @@
-# $Id: 01load.t 449 2005-05-23 18:53:36Z struan $
+# $Id$
 
 use Test::More tests => 5;
 




More information about the Pkg-perl-cvs-commits mailing list