r27067 - in /trunk/libtext-markdown-perl: Changes MANIFEST META.yml debian/changelog lib/Text/Markdown.pm lib/Text/MultiMarkdown.pm t/03podspelling.t t/40trustliststart.t

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Sat Nov 22 11:26:40 UTC 2008


Author: ansgar-guest
Date: Sat Nov 22 11:26:37 2008
New Revision: 27067

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27067
Log:
New upstream release.

Added:
    trunk/libtext-markdown-perl/t/40trustliststart.t
      - copied unchanged from r27066, branches/upstream/libtext-markdown-perl/current/t/40trustliststart.t
Modified:
    trunk/libtext-markdown-perl/Changes
    trunk/libtext-markdown-perl/MANIFEST
    trunk/libtext-markdown-perl/META.yml
    trunk/libtext-markdown-perl/debian/changelog
    trunk/libtext-markdown-perl/lib/Text/Markdown.pm
    trunk/libtext-markdown-perl/lib/Text/MultiMarkdown.pm
    trunk/libtext-markdown-perl/t/03podspelling.t

Modified: trunk/libtext-markdown-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-markdown-perl/Changes?rev=27067&op=diff
==============================================================================
--- trunk/libtext-markdown-perl/Changes (original)
+++ trunk/libtext-markdown-perl/Changes Sat Nov 22 11:26:37 2008
@@ -199,3 +199,9 @@
           
 1.0.23 2008-11-02T18:24:30
         - Ship a release with the correct contents so that the tests pass.
+
+1.0.24 2008-11-16T14:33:30
+        - Add trust_list_start_value patch from Ricardo Signes (RT#40814)
+          to enable <li value='X'> output for list numbering.
+          This feature is disabled by default.
+

Modified: trunk/libtext-markdown-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-markdown-perl/MANIFEST?rev=27067&op=diff
==============================================================================
--- trunk/libtext-markdown-perl/MANIFEST (original)
+++ trunk/libtext-markdown-perl/MANIFEST Sat Nov 22 11:26:37 2008
@@ -59,6 +59,7 @@
 t/37anchormultilinebugs.t
 t/38listshorizontalrule.t
 t/39listsindentededgecase.t
+t/40trustliststart.t
 t/code-hr.t
 t/docs-maruku-unittest/abbreviations.html
 t/docs-maruku-unittest/abbreviations.text

Modified: trunk/libtext-markdown-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-markdown-perl/META.yml?rev=27067&op=diff
==============================================================================
--- trunk/libtext-markdown-perl/META.yml (original)
+++ trunk/libtext-markdown-perl/META.yml Sat Nov 22 11:26:37 2008
@@ -26,4 +26,4 @@
   perl: 5.8.0
 resources:
   repository: http://svn.kulp.ch/cpan/text_multimarkdown
-version: 1.0.23
+version: 1.0.24

Modified: trunk/libtext-markdown-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-markdown-perl/debian/changelog?rev=27067&op=diff
==============================================================================
--- trunk/libtext-markdown-perl/debian/changelog (original)
+++ trunk/libtext-markdown-perl/debian/changelog Sat Nov 22 11:26:37 2008
@@ -1,9 +1,13 @@
-libtext-markdown-perl (1.0.23-2) UNRELEASED; urgency=low
+libtext-markdown-perl (1.0.24-1) unstable; urgency=low
 
+  [ gregor herrmann ]
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
 
- -- gregor herrmann <gregoa at debian.org>  Sun, 16 Nov 2008 20:48:18 +0100
+  [ Ansgar Burchardt ]
+  * New upstream release.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org>  Sat, 22 Nov 2008 12:26:08 +0100
 
 libtext-markdown-perl (1.0.23-1) unstable; urgency=low
 

Modified: trunk/libtext-markdown-perl/lib/Text/Markdown.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-markdown-perl/lib/Text/Markdown.pm?rev=27067&op=diff
==============================================================================
--- trunk/libtext-markdown-perl/lib/Text/Markdown.pm (original)
+++ trunk/libtext-markdown-perl/lib/Text/Markdown.pm Sat Nov 22 11:26:37 2008
@@ -9,7 +9,7 @@
 use Carp        qw(croak);
 use base        'Exporter';
 
-our $VERSION   = '1.0.23';
+our $VERSION   = '1.0.24';
 our @EXPORT_OK = qw(markdown);
 
 =head1 NAME
@@ -67,7 +67,7 @@
 
 =over
 
-=item empty element suffix
+=item empty_element_suffix
 
 This option can be used to generate normal HTML output. By default, it is ' />', which is xHTML, change to '>' for normal HTML.
 
@@ -78,6 +78,21 @@
 =item markdown_in_html_blocks
 
 Controls if Markdown is processed when inside HTML blocks. Defaults to 0.
+
+=item trust_list_start_value
+
+If true, ordered lists will use the first number as the starting point for
+numbering.  This will let you pick up where you left off by writing:
+
+  1. foo
+  2. bar
+
+  some paragraph
+
+  3. baz
+  6. quux
+
+(Note that in the above, quux will be numbered 4.)
 
 =back
 
@@ -133,6 +148,8 @@
         
     # Is markdown processed in HTML blocks? See t/15inlinehtmldonotturnoffmarkdown.t
     $p{markdown_in_html_blocks} = $p{markdown_in_html_blocks} ? 1 : 0;
+
+    $p{trust_list_start_value} = $p{trust_list_start_value} ? 1 : 0;
     
     my $self = { params => \%p };
     bless $self, ref($class) || $class;
@@ -927,14 +944,16 @@
                 $whole_list
             }{
                 my $list = $1;
-                my $list_type = ($3 =~ m/$marker_ul/) ? "ul" : "ol";
+                my $marker = $3;
+                my $list_type = ($marker =~ m/$marker_ul/) ? "ul" : "ol";
                 # Turn double returns into triple returns, so that we can make a
                 # paragraph for the last item in a list, if necessary:
                 $list =~ s/\n{2,}/\n\n\n/g;
                 my $result = ( $list_type eq 'ul' ) ?
                     $self->_ProcessListItemsUL($list, $marker_ul)
                   : $self->_ProcessListItemsOL($list, $marker_ol);
-                $result = "<$list_type>\n" . $result . "</$list_type>\n";
+
+                $result = $self->_MakeList($list_type, $result, $marker);
                 $result;
             }egmx;
     }
@@ -944,20 +963,32 @@
                 $whole_list
             }{
                 my $list = $1;
-                my $list_type = ($3 =~ m/$marker_ul/) ? "ul" : "ol";
+                my $marker = $3;
+                my $list_type = ($marker =~ m/$marker_ul/) ? "ul" : "ol";
                 # Turn double returns into triple returns, so that we can make a
                 # paragraph for the last item in a list, if necessary:
                 $list =~ s/\n{2,}/\n\n\n/g;
                 my $result = ( $list_type eq 'ul' ) ?
                     $self->_ProcessListItemsUL($list, $marker_ul)
                   : $self->_ProcessListItemsOL($list, $marker_ol);
-                $result = "<$list_type>\n" . $result . "</$list_type>\n";
+                $result = $self->_MakeList($list_type, $result, $marker);
                 $result;
             }egmx;
     }
 
 
     return $text;
+}
+
+sub _MakeList {
+  my ($self, $list_type, $content, $marker) = @_;
+
+  if ($list_type eq 'ol' and $self->{trust_list_start_value}) {
+    my ($num) = $marker =~ /^(\d+)[.]/;
+    return "<ol start='$num'>\n" . $content . "</ol>\n";
+  }
+
+  return "<$list_type>\n" . $content . "</$list_type>\n";
 }
 
 sub _ProcessListItemsOL {

Modified: trunk/libtext-markdown-perl/lib/Text/MultiMarkdown.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-markdown-perl/lib/Text/MultiMarkdown.pm?rev=27067&op=diff
==============================================================================
--- trunk/libtext-markdown-perl/lib/Text/MultiMarkdown.pm (original)
+++ trunk/libtext-markdown-perl/lib/Text/MultiMarkdown.pm Sat Nov 22 11:26:37 2008
@@ -9,7 +9,7 @@
 use Carp        qw(croak);
 use base        qw(Text::Markdown);
 
-our $VERSION   = '1.0.23';
+our $VERSION   = '1.0.24';
 our @EXPORT_OK = qw(markdown);
 
 =head1 NAME

Modified: trunk/libtext-markdown-perl/t/03podspelling.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-markdown-perl/t/03podspelling.t?rev=27067&op=diff
==============================================================================
--- trunk/libtext-markdown-perl/t/03podspelling.t (original)
+++ trunk/libtext-markdown-perl/t/03podspelling.t Sat Nov 22 11:26:37 2008
@@ -47,3 +47,5 @@
 XHTML
 html
 shortversion
+quux
+




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