r46400 - in /branches/upstream/libtext-markdown-perl/current: ./ inc/Module/Install/ lib/Text/ t/ t/Text-Markdown.mdtest/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Mon Oct 26 03:56:33 UTC 2009
Author: jawnsy-guest
Date: Mon Oct 26 03:55:55 2009
New Revision: 46400
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46400
Log:
[svn-upgrade] Integrating new upstream version, libtext-markdown-perl (1.000027)
Added:
branches/upstream/libtext-markdown-perl/current/Text-Markdown-1.0.25.tar.gz (with props)
branches/upstream/libtext-markdown-perl/current/Text-Markdown-1.0.26.tar.gz (with props)
branches/upstream/libtext-markdown-perl/current/inc/Module/Install/CheckConflicts.pm
branches/upstream/libtext-markdown-perl/current/t/04ensure_1_newline_before_EOF.t
branches/upstream/libtext-markdown-perl/current/t/05markdown_in_divs.t
branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.html
branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.text
branches/upstream/libtext-markdown-perl/current/t/rt48943.t
Modified:
branches/upstream/libtext-markdown-perl/current/Changes
branches/upstream/libtext-markdown-perl/current/MANIFEST
branches/upstream/libtext-markdown-perl/current/META.yml
branches/upstream/libtext-markdown-perl/current/Makefile.PL
branches/upstream/libtext-markdown-perl/current/README
branches/upstream/libtext-markdown-perl/current/lib/Text/Markdown.pm
Modified: branches/upstream/libtext-markdown-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/Changes?rev=46400&op=diff
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/Changes (original)
+++ branches/upstream/libtext-markdown-perl/current/Changes Mon Oct 26 03:55:55 2009
@@ -1,4 +1,8 @@
This file documents the revision history for Perl extension Text::Markdown.
+
+1.0.27 2009-10-25T19:13:47
+ - Change to perl style version numbers (from 3 part versions) to
+ avoid depndency confusion with Text::MultiMarkdown
1.0.26 2009-10-04T00:37:00
- Minor POD changes (typos, wrapping)
Modified: branches/upstream/libtext-markdown-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/MANIFEST?rev=46400&op=diff
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/MANIFEST (original)
+++ branches/upstream/libtext-markdown-perl/current/MANIFEST Mon Oct 26 03:55:55 2009
@@ -2,6 +2,7 @@
inc/Module/Install.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
+inc/Module/Install/CheckConflicts.pm
inc/Module/Install/Fetch.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
@@ -17,6 +18,8 @@
script/Markdown.pl
t/02pod.t
t/03podcoverage.t
+t/04ensure_1_newline_before_EOF.t
+t/05markdown_in_divs.t
t/19exporter-markdown.t
t/21fulldocs-text-markdown.t
t/23fulldocs-markdown.t
@@ -368,12 +371,15 @@
t/PHP_Markdown-from-MDTest1.1.mdtest/Tight_blocks.text
t/PHP_Markdown-from-MDTest1.1.mdtest/Tight_blocks.xhtml
t/rt37909.t
+t/rt48943.t
t/Text-Markdown.mdtest/CoreDumps5.8.text
t/Text-Markdown.mdtest/CoreDumps5.8.xhtml
t/Text-Markdown.mdtest/Emphasis.text
t/Text-Markdown.mdtest/Emphasis.xhtml
t/Text-Markdown.mdtest/HTML-Comment-encoding.text
t/Text-Markdown.mdtest/HTML-Comment-encoding.xhtml
+t/Text-Markdown.mdtest/HTML5-attributes.html
+t/Text-Markdown.mdtest/HTML5-attributes.text
t/Text-Markdown.mdtest/Links_brackets.text
t/Text-Markdown.mdtest/Links_brackets.xhtml
t/Text-Markdown.mdtest/Links_multiline_bugs_1.html
@@ -388,4 +394,6 @@
t/Text-Markdown.mdtest/PHP-ASP_tags.xhtml
t/Text-Markdown.mdtest/Unicode.text
t/Text-Markdown.mdtest/Unicode.xhtml
+Text-Markdown-1.0.25.tar.gz
+Text-Markdown-1.0.26.tar.gz
Todo
Modified: branches/upstream/libtext-markdown-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/META.yml?rev=46400&op=diff
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/META.yml (original)
+++ branches/upstream/libtext-markdown-perl/current/META.yml Mon Oct 26 03:55:55 2009
@@ -9,7 +9,6 @@
List::MoreUtils: 0
Test::Exception: 0
Test::More: 0.42
- script/Markdown.pl: 0
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
@@ -32,4 +31,4 @@
bugtracker: http://github.com/bobtfish/text-markdown/issues
license: http://opensource.org/licenses/bsd-license.php
repository: http://github.com/bobtfish/text-markdown/
-version: 1.0.26
+version: 1.000027
Modified: branches/upstream/libtext-markdown-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/Makefile.PL?rev=46400&op=diff
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/Makefile.PL (original)
+++ branches/upstream/libtext-markdown-perl/current/Makefile.PL Mon Oct 26 03:55:55 2009
@@ -21,6 +21,16 @@
build_requires 'File::Slurp' => '9999.08';
build_requires 'FindBin' => undef;
+if ($Module::Install::AUTHOR) {
+ system("pod2text lib/Text/Markdown.pm > README")
+ and die $!;
+ require Module::Install::CheckConflicts;
+}
+
+check_conflicts(
+ 'Text::MultiMarkdown' => '1.0.27',
+);
+
# Scripts I install
prompt_script('script/Markdown.pl');
Modified: branches/upstream/libtext-markdown-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/README?rev=46400&op=diff
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/README (original)
+++ branches/upstream/libtext-markdown-perl/current/README Mon Oct 26 03:55:55 2009
@@ -38,44 +38,62 @@
http://daringfireball.net/projects/markdown/
- Note that Text::Markdown ensures that the output always ends with
- *one* newline. The fact that multiple newlines are collapsed into one
- makes sense, because this is the behavior of HTML towards whispace. The
- fact that there's always a newline at the end makes sense again, given
- that the output will always be nested in a block-level element (as
- opposed to an inline element). That block element can be a <p> (most
- often), or a <table>.
-
- Markdown is *not* interpreted in HTML block-level elements, in order for
+ Note that Text::Markdown ensures that the output always ends with one
+ newline. The fact that multiple newlines are collapsed into one makes
+ sense, because this is the behavior of HTML towards whispace. The fact
+ that there's always a newline at the end makes sense again, given that
+ the output will always be nested in a block-level element (as opposed to
+ an inline element). That block element can be a "<p>" (most often), or a
+ "<table>".
+
+ Markdown is not interpreted in HTML block-level elements, in order for
chunks of pasted HTML (e.g. JavaScript widgets, web counters) to not be
- magically (mis)interpreted. For selective processing of Markdown in some,
- but not other, HTML block elements, add a "markdown" attribute to the block
- element and set its value to "1", "on" or "yes":
-
+ magically (mis)interpreted. For selective processing of Markdown in
+ some, but not other, HTML block elements, add a "markdown" attribute to
+ the block element and set its value to 1, "on" or "yes":
+
<div markdown="1" class="navbar">
* Home
* About
* Contact
<div>
-
- The extra "markdown" attribute will be stripped when generating the output.
-
+
+ The extra "markdown" attribute will be stripped when generating the
+ output.
+
OPTIONS
Text::Markdown supports a number of options to its processor which
control the behaviour of the output document.
- These options can be supplied to the constructor, on in a hash with the
- individual calls to the markdown method. See the synopsis for examples
- of both of the above styles.
+ These options can be supplied to the constructor, or in a hash within
+ individual calls to the "markdown" method. See the SYNOPSIS for examples
+ of both styles.
The options for the processor are:
- 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.
+ empty_element_suffix
+ This option controls the end of empty element tags:
+
+ '/>' for XHTML (default)
+ '>' for HTML
tab_width
- Controls indent width in the generated markup, defaults to 4
+ Controls indent width in the generated markup. Defaults to 4.
+
+ 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.)
METHODS
new
@@ -102,7 +120,7 @@
C - <http://www.pell.portland.or.us/~orc/Code/discount>
Discount - Original Markdown, but in C. Fastest implementation
- available, and passes MDTest. Adds it's own set of custom features.
+ available, and passes MDTest. Adds its own set of custom features.
python - <http://www.freewisdom.org/projects/python-markdown/>
Python Markdown which is mostly compatible with the original, with
@@ -131,7 +149,7 @@
To file bug reports or feature requests please send email to:
bug-Text-Markdown at rt.cpan.org
-
+
Please include with your report: (1) the example input; (2) the output
you expected; (3) the output Markdown actually produced.
@@ -141,18 +159,18 @@
AUTHOR
John Gruber
http://daringfireball.net/
-
+
PHP port and other contributions by Michel Fortin
http://michelf.com/
-
+
MultiMarkdown changes by Fletcher Penney
http://fletcher.freeshell.org/
-
+
CPAN Module Text::MultiMarkdown (based on Text::Markdown by Sebastian
Riedel) originally by Darren Kulp (http://kulp.ch/)
-
+
Support for markdown="1" by Dan Dascalescu (http://dandascalescu.com)
-
+
This module is maintained by: Tomas Doran http://www.bobtfish.net/
THIS DISTRIBUTION
@@ -170,6 +188,11 @@
that which is documented at daringfireball. If you want additional
features, you should look at Text::MultiMarkdown.
+SOURCE CODE
+ You can find the source code repository for Text::Markdown and
+ Text::MultiMarkdown on GitHub at
+ <http://github.com/bobtfish/text-markdown>.
+
COPYRIGHT AND LICENSE
Original Code Copyright (c) 2003-2004 John Gruber
<http://daringfireball.net/> All rights reserved.
@@ -177,7 +200,7 @@
MultiMarkdown changes Copyright (c) 2005-2006 Fletcher T. Penney
<http://fletcher.freeshell.org/> All rights reserved.
- Text::MultiMarkdown changes Copyright (c) 2006-2008 Darren Kulp
+ Text::MultiMarkdown changes Copyright (c) 2006-2009 Darren Kulp
<http://kulp.ch> and Tomas Doran <http://www.bobtfish.net>
Redistribution and use in source and binary forms, with or without
Added: branches/upstream/libtext-markdown-perl/current/Text-Markdown-1.0.25.tar.gz
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/Text-Markdown-1.0.25.tar.gz?rev=46400&op=file
==============================================================================
Binary file - no diff available.
Propchange: branches/upstream/libtext-markdown-perl/current/Text-Markdown-1.0.25.tar.gz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: branches/upstream/libtext-markdown-perl/current/Text-Markdown-1.0.26.tar.gz
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/Text-Markdown-1.0.26.tar.gz?rev=46400&op=file
==============================================================================
Binary file - no diff available.
Propchange: branches/upstream/libtext-markdown-perl/current/Text-Markdown-1.0.26.tar.gz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: branches/upstream/libtext-markdown-perl/current/inc/Module/Install/CheckConflicts.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/inc/Module/Install/CheckConflicts.pm?rev=46400&op=file
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/inc/Module/Install/CheckConflicts.pm (added)
+++ branches/upstream/libtext-markdown-perl/current/inc/Module/Install/CheckConflicts.pm Mon Oct 26 03:55:55 2009
@@ -1,0 +1,65 @@
+#line 1
+use strict;
+use warnings;
+
+package Module::Install::CheckConflicts;
+
+use base 'Module::Install::Base';
+
+BEGIN {
+ our $VERSION = '0.02';
+ our $ISCORE = 1;
+}
+
+sub check_conflicts {
+ my ($self, %conflicts) = @_;
+
+ my %conflicts_found;
+ for my $mod (sort keys %conflicts) {
+ next unless $self->can_use($mod);
+
+ my $installed = $mod->VERSION;
+ next unless $installed le $conflicts{$mod};
+
+ $conflicts_found{$mod} = $installed;
+ }
+
+ return unless scalar keys %conflicts_found;
+
+ my $dist = $self->name;
+
+ print <<"EOM";
+
+***
+ WARNING:
+
+ This version of ${dist} conflicts with
+ the version of some modules you have installed.
+
+ You will need to upgrade these modules after
+ installing this version of ${dist}.
+
+ List of the conflicting modules and their installed
+ versions:
+
+EOM
+
+ for my $mod (sort keys %conflicts_found) {
+ print sprintf(" %s : %s (<= %s)\n",
+ $mod, $conflicts_found{$mod}, $conflicts{$mod},
+ );
+ }
+
+ print "\n***\n";
+
+ return if $ENV{PERL_MM_USE_DEFAULT};
+ return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
+
+ sleep 4;
+}
+
+1;
+
+__END__
+
+#line 122
Modified: branches/upstream/libtext-markdown-perl/current/lib/Text/Markdown.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/lib/Text/Markdown.pm?rev=46400&op=diff
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/lib/Text/Markdown.pm (original)
+++ branches/upstream/libtext-markdown-perl/current/lib/Text/Markdown.pm Mon Oct 26 03:55:55 2009
@@ -9,7 +9,8 @@
use Carp qw(croak);
use base 'Exporter';
-our $VERSION = '1.0.26';
+our $VERSION = '1.000027'; # 1.0.27
+$VERSION = eval $VERSION;
our @EXPORT_OK = qw(markdown);
=head1 NAME
Added: branches/upstream/libtext-markdown-perl/current/t/04ensure_1_newline_before_EOF.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/t/04ensure_1_newline_before_EOF.t?rev=46400&op=file
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/t/04ensure_1_newline_before_EOF.t (added)
+++ branches/upstream/libtext-markdown-perl/current/t/04ensure_1_newline_before_EOF.t Mon Oct 26 03:55:55 2009
@@ -1,0 +1,17 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+use Test::Differences;
+
+use FindBin '$Bin';
+use lib "$Bin/../lib";
+
+use_ok 'Text::Markdown';
+my $m = Text::Markdown->new();
+my ($out, $expected);
+
+$out = $m->markdown("foo\n\n\n");
+eq_or_diff($out, "<p>foo</p>\n", "collapse multiple newlines at EOF into one");
+
+$out = $m->markdown("foo");
+eq_or_diff($out, "<p>foo</p>\n", "ensure newline before EOF");
Added: branches/upstream/libtext-markdown-perl/current/t/05markdown_in_divs.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/t/05markdown_in_divs.t?rev=46400&op=file
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/t/05markdown_in_divs.t (added)
+++ branches/upstream/libtext-markdown-perl/current/t/05markdown_in_divs.t Mon Oct 26 03:55:55 2009
@@ -1,0 +1,411 @@
+use strict;
+use warnings;
+use Test::More tests => 21;
+use Test::Differences;
+use FindBin '$Bin';
+use lib "$Bin/../lib";
+
+use_ok 'Text::Markdown';
+
+my $m = Text::Markdown->new();
+my ($html, $test);
+
+#-------------------------------------------------------------------------------
+$test = "sanity check: markown in block elements doesn't get interpreted";
+$html = $m->markdown(<<"EOF");
+<h2>
+Literal *asterisks*
+and _underscores_
+</h2>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<h2>
+Literal *asterisks*
+and _underscores_
+</h2>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = 'markdown on in div - generate <p> tags';
+$html = $m->markdown(<<"EOF");
+some text here
+
+<div markdown="1">
+Interpreted *asterisks*
+and _underscores_
+</div>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<p>some text here</p>
+
+<div>
+<p>Interpreted <em>asterisks</em>
+and <em>underscores</em></p>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = 'markdown on in h2 - no <p> tags in h2';
+$html = $m->markdown(<<"EOF");
+some text here
+
+<h2 markdown="on">
+Interpreted *asterisks*
+and _underscores_
+</h2>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<p>some text here</p>
+
+<h2>
+Interpreted <em>asterisks</em>
+and <em>underscores</em>
+</h2>
+EOF
+
+
+#-------------------------------------------------------------------------------
+# "block-level HTML elements â e.g. <div>, <table>, <pre>, <p>, etc. â must be separated
+# from surrounding content by blank lines, and the start and end tags of the block
+# should not be indented with tabs or spaces." -- http://daringfireball.net/projects/markdown/syntax#html
+$test = 'some characters before an <h2> make the h2 an ignored element';
+$html = $m->markdown(<<"EOF");
+stuff<h2>
+Interpreted *asterisks* and _underscores_
+because HTML block elements must be separated from surrounding content by blank lines
+</h2>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<p>stuff<h2>
+Interpreted <em>asterisks</em> and <em>underscores</em>
+because HTML block elements must be separated from surrounding content by blank lines
+</h2></p>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = "adding markdown='on' if there were some characters before the h2, doesn't change anything. markdown='on' won't be removed.";
+$html = $m->markdown(<<"EOF");
+stuff<h2 markdown="on">
+Interpreted *asterisks* and _underscores_, and markdown="on" left alone
+because this wasn't a block HTML element in the first place
+</h2>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<p>stuff<h2 markdown="on">
+Interpreted <em>asterisks</em> and <em>underscores</em>, and markdown="on" left alone
+because this wasn't a block HTML element in the first place
+</h2></p>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<hr> in span-level HTML';
+$html = $m->markdown(<<"EOF");
+<span style="color: red">
+Interpreted *asterisks*.
+<hr>
+Interpreted _underscores_.
+</span>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<p><span style="color: red">
+Interpreted <em>asterisks</em>.
+<hr>
+Interpreted <em>underscores</em>.
+</span></p>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<hr> in block-level HTML with markdown="on"';
+$html = $m->markdown(<<"EOF");
+<div markdown="on">
+Interpreted *asterisks*.
+<hr>
+Interpreted _underscores_.
+</div>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<div>
+<p>Interpreted <em>asterisks</em>.
+<hr>
+Interpreted <em>underscores</em>.</p>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = "don't mess with the markdown attribute if part of code span or block";
+$html = $m->markdown(<<"EOF");
+A `<div markdown="1">` will interpret Markdown, unless in a code block.
+
+ <div markdown="1">
+ The *above* is a '<div>' tag
+ in a code block</div>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<p>A <code><div markdown="1"></code> will interpret Markdown, unless in a code block.</p>
+
+<pre><code><div markdown="1">
+The *above* is a '<div>' tag
+in a code block</div>
+</code></pre>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = "leave [div] alone, it's not <div>";
+$html = $m->markdown(<<"EOF");
+[div markdown="1"]
+The above is NOT a <div>!
+</div>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<p>[div markdown="1"]
+The above is NOT a <div>!
+</div></p>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = "leave !div! alone, it's not <div>, and it's in code too";
+$html = $m->markdown(<<"EOF");
+ !div markdown="1"!
+ The above is NOT a <div>!
+ </div>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<pre><code>!div markdown="1"!
+The above is NOT a <div>!
+</div>
+</code></pre>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = 'start interpreting Markdown without blank line sandwiching';
+$html = $m->markdown(<<"EOF");
+*outside of the div*
+<div markdown="1">
+*start interpreting Markdown without blank line sandwiching*
+</div>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<p><em>outside of the div</em></p>
+
+<div>
+<p><em>start interpreting Markdown without blank line sandwiching</em></p>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<div markdown="1"> with inner list';
+$html = $m->markdown(<<"EOF");
+<div markdown="1">
+
+1. this
+2. is a list
+
+</div>
+EOF
+
+eq_or_diff $html, <<'EOF', $test;
+<div>
+<ol>
+<li>this</li>
+<li>is a list</li>
+</ol>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<div markdown="1"> with inner code block';
+$html = $m->markdown(<<"EOF");
+<div markdown="1">
+
+ code line 1
+ code line 2
+
+</div>
+EOF
+
+eq_or_diff $html, <<'EOF', $test;
+<div>
+<pre><code>code line 1
+code line 2
+</code></pre>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<div markdown="1"> with inner blockquote';
+$html = $m->markdown(<<"EOF");
+<div markdown="1">
+> Thus spoke Lincoln
+</div>
+EOF
+
+eq_or_diff $html, <<'EOF', $test;
+<div>
+<blockquote>
+ <p>Thus spoke Lincoln</p>
+</blockquote>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<div markdown="1"> with inner block HTML';
+$html = $m->markdown(<<"EOF");
+<div markdown="1">
+*interpreted*
+
+<div><script>var i = _count_ ;</script></div>
+</div>
+EOF
+
+eq_or_diff $html, <<'EOF', $test;
+<div>
+<p><em>interpreted</em></p>
+
+<div><script>var i = _count_ ;</script></div>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<div markdown="1"> with inner <div>, which ends with exactly one line';
+$html = $m->markdown(<<"EOF");
+<div markdown="1">
+<div><script>var i = _count_ ;</script></div>
+
+
+</div>
+EOF
+
+eq_or_diff $html, <<'EOF', $test;
+<div>
+<div><script>var i = _count_ ;</script></div>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<div markdown="1"> comprehensive';
+$html = $m->markdown(<<"EOF");
+*marked down text*
+
+<div markdown="1">
+
+* this
+* is a list
+
+</div>
+
+<div markdown="0">
+*no markdown interpretation here*
+</div>
+
+<div>
+*no markdown interpretation here*
+</div>
+
+<div markdown="1" class="navbar">
+1. Home
+2. About
+</div>
+
+<div markdown="0" clas="web_counter">
+*no markdown interpretation here*
+</div>
+EOF
+
+eq_or_diff $html, <<'EOF', $test;
+<p><em>marked down text</em></p>
+
+<div>
+<ul>
+<li>this</li>
+<li>is a list</li>
+</ul>
+</div>
+
+<div>
+*no markdown interpretation here*
+</div>
+
+<div>
+*no markdown interpretation here*
+</div>
+
+<div class="navbar">
+<ol>
+<li>Home</li>
+<li>About</li>
+</ol>
+</div>
+
+<div clas="web_counter">
+*no markdown interpretation here*
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<div markdown="1"> with multiple lines of attributes';
+$html = $m->markdown(<<"EOF");
+<div markdown="1"
+ class="navbar"
+>
+*multiple lines of attributes*
+</div>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<div
+ class="navbar"
+>
+<p><em>multiple lines of attributes</em></p>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = '<div \n\n...\n markdown="1"> - can put the markdown="1" attribute anywhere';
+$html = $m->markdown(<<"EOF");
+<div class="navbar"
+ markdown="1"
+>
+*multiple lines of attributes*
+</div>
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<div class="navbar"
+>
+<p><em>multiple lines of attributes</em></p>
+</div>
+EOF
+
+
+#-------------------------------------------------------------------------------
+$test = "sanity check: just code";
+$html = $m->markdown(<<"EOF");
+Below is code
+
+ code
+
+Above was code
+EOF
+eq_or_diff $html, <<'EOF', $test;
+<p>Below is code</p>
+
+<pre><code>code
+</code></pre>
+
+<p>Above was code</p>
+EOF
Added: branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.html
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.html?rev=46400&op=file
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.html (added)
+++ branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.html Mon Oct 26 03:55:55 2009
@@ -1,0 +1,11 @@
+<h1 class=foo>foo</h1>
+
+<p class=bar>
+this is a paragraph
+</p>
+
+<h2 class=bar>
+an h2
+</h2>
+
+<p>normal</p>
Added: branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.text
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.text?rev=46400&op=file
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.text (added)
+++ branches/upstream/libtext-markdown-perl/current/t/Text-Markdown.mdtest/HTML5-attributes.text Mon Oct 26 03:55:55 2009
@@ -1,0 +1,11 @@
+<h1 class=foo>foo</h1>
+
+<p class=bar>
+this is a paragraph
+</p>
+
+<h2 class=bar>
+an h2
+</h2>
+
+normal
Added: branches/upstream/libtext-markdown-perl/current/t/rt48943.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-markdown-perl/current/t/rt48943.t?rev=46400&op=file
==============================================================================
--- branches/upstream/libtext-markdown-perl/current/t/rt48943.t (added)
+++ branches/upstream/libtext-markdown-perl/current/t/rt48943.t Mon Oct 26 03:55:55 2009
@@ -1,0 +1,11 @@
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+use_ok( 'Text::Markdown', 'markdown' );
+
+my $str = '<h1 class=center>foo</h1>';
+my $m = Text::Markdown->new;
+my $html1 = $m->markdown($str);
+like( $html1, qr/^$str/ );
+
More information about the Pkg-perl-cvs-commits
mailing list