r27202 - in /branches/upstream/libhtml-wikiconverter-markdown-perl/current: Changes META.yml Makefile.PL lib/HTML/WikiConverter/Markdown.pm t/markdown.t t/pod-coverage.t t/runtests.pl
bremner-guest at users.alioth.debian.org
bremner-guest at users.alioth.debian.org
Sun Nov 23 13:24:10 UTC 2008
Author: bremner-guest
Date: Sun Nov 23 13:24:08 2008
New Revision: 27202
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27202
Log:
[svn-upgrade] Integrating new upstream version, libhtml-wikiconverter-markdown-perl (0.03)
Modified:
branches/upstream/libhtml-wikiconverter-markdown-perl/current/Changes
branches/upstream/libhtml-wikiconverter-markdown-perl/current/META.yml
branches/upstream/libhtml-wikiconverter-markdown-perl/current/Makefile.PL
branches/upstream/libhtml-wikiconverter-markdown-perl/current/lib/HTML/WikiConverter/Markdown.pm
branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/markdown.t
branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/pod-coverage.t
branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/runtests.pl
Modified: branches/upstream/libhtml-wikiconverter-markdown-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-markdown-perl/current/Changes?rev=27202&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-markdown-perl/current/Changes (original)
+++ branches/upstream/libhtml-wikiconverter-markdown-perl/current/Changes Sun Nov 23 13:24:08 2008
@@ -1,12 +1,20 @@
# Revision history for HTML::WikiConverter::Markdown
-date: Thu Jul 20 18:00:00 EST 2006
+date: 2008-11-14
+version: 0.03
+changes:
+ - (bug #40914) require H::WC 0.63
+ - add perl license to Makefile.PL
+ - add more comprehensive test
+ - tighten pod-coverage.t loose ends
+
+date: 2006-07-20
version: 0.02
changes:
- - require 0.60
+ - require H::WC 0.60
- add attribute types
-date: Wed Jun 07 10:00:00 EST 2006
+date: 2006-07-07
version: 0.01
changes:
- initial release (fulfill feature request: bug #18111)
Modified: branches/upstream/libhtml-wikiconverter-markdown-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-markdown-perl/current/META.yml?rev=27202&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-markdown-perl/current/META.yml (original)
+++ branches/upstream/libhtml-wikiconverter-markdown-perl/current/META.yml Sun Nov 23 13:24:08 2008
@@ -1,15 +1,24 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: HTML-WikiConverter-Markdown
-version: 0.02
-version_from: lib/HTML/WikiConverter/Markdown.pm
-installdirs: site
+--- #YAML:1.0
+name: HTML-WikiConverter-Markdown
+version: 0.03
+abstract: Convert HTML to Markdown markup
+author:
+ - David J. Iberri <diberri at cpan.org>
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
requires:
- HTML::Tagset: 0
- HTML::WikiConverter: 0.6
- Params::Validate: 0
- Test::More: 0
- URI: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+ HTML::Tagset: 0
+ HTML::WikiConverter: 0.63
+ Params::Validate: 0
+ Test::More: 0
+ URI: 0
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.48
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libhtml-wikiconverter-markdown-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-markdown-perl/current/Makefile.PL?rev=27202&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-markdown-perl/current/Makefile.PL (original)
+++ branches/upstream/libhtml-wikiconverter-markdown-perl/current/Makefile.PL Sun Nov 23 13:24:08 2008
@@ -5,12 +5,13 @@
WriteMakefile(
NAME => 'HTML::WikiConverter::Markdown',
AUTHOR => 'David J. Iberri <diberri at cpan.org>',
+ LICENSE => 'perl',
VERSION_FROM => 'lib/HTML/WikiConverter/Markdown.pm',
ABSTRACT_FROM => 'lib/HTML/WikiConverter/Markdown.pm',
PL_FILES => {},
PREREQ_PM => {
'Test::More' => 0,
- 'HTML::WikiConverter' => 0.60,
+ 'HTML::WikiConverter' => 0.63,
'HTML::Tagset' => 0,
'Params::Validate' => 0,
'URI' => 0,
Modified: branches/upstream/libhtml-wikiconverter-markdown-perl/current/lib/HTML/WikiConverter/Markdown.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-markdown-perl/current/lib/HTML/WikiConverter/Markdown.pm?rev=27202&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-markdown-perl/current/lib/HTML/WikiConverter/Markdown.pm (original)
+++ branches/upstream/libhtml-wikiconverter-markdown-perl/current/lib/HTML/WikiConverter/Markdown.pm Sun Nov 23 13:24:08 2008
@@ -4,7 +4,7 @@
use strict;
use base 'HTML::WikiConverter';
-our $VERSION = '0.02';
+our $VERSION = '0.03';
use Params::Validate ':types';
use HTML::Tagset;
@@ -134,6 +134,7 @@
sub _header_start {
my( $self, $node, $rules ) = @_;
return '' unless $self->header_style eq 'atx';
+
( my $level = $node->tag ) =~ s/\D//g;
return unless $level;
Modified: branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/markdown.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/markdown.t?rev=27202&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/markdown.t (original)
+++ branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/markdown.t Sun Nov 23 13:24:08 2008
@@ -1,3 +1,5 @@
+use HTML::WikiConverter;
+
local $/;
require 't/runtests.pl';
runtests( data => <DATA>, dialect => 'Markdown', wiki_uri => 'http://www.test.com/wiki/' );
@@ -321,3 +323,42 @@
-------
More fun stuff!
+__NEXT__
+more complete example ::header_style('atx')
+__H__
+<h2>Aaron Swartz's html2text</h2>
+
+<p>A handful of people have asked if there's a way to translate Markdown
+in reverse — to turn HTML back into Markdown-formatted plain text.
+The short answer is yes, by using Aaron Swartz's new version of
+<a href="http://www.aaronsw.com/2002/html2text/">html2text</a>:</p>
+
+<blockquote>
+ <p>html2text is a Python script that convers a page of HTML into clean,
+ easy-to-read plain ASCII. Better yet, that ASCII also happens to be
+ valid Markdown (a text-to-HTML format).</p>
+</blockquote>
+
+<p>html2text works so well that I'm planning to use it to convert most of
+my old Daring Fireball articles (the ones I wrote in raw HTML). It's
+worth noting that if you start with a Markdown document, translate it
+to HTML, then use html2text to go back to Markdown, it won't give you
+the exact same document you started with. That sort of complete
+round-trip fidelity simply is not possible, but html2text comes pretty
+close.</p>
+
+<p>Also, much like Markdown and SmartyPants, html2text works as a BBEdit
+text filter. Simply save a copy in the Unix Filters folder in your
+BBEdit Support folder.</p>
+__W__
+## Aaron Swartz's html2text
+
+A handful of people have asked if there's a way to translate Markdown in reverse — to turn HTML back into Markdown-formatted plain text. The short answer is yes, by using Aaron Swartz's new version of [html2text][1]:
+
+> html2text is a Python script that convers a page of HTML into clean, easy-to-read plain ASCII. Better yet, that ASCII also happens to be valid Markdown (a text-to-HTML format).
+
+html2text works so well that I'm planning to use it to convert most of my old Daring Fireball articles (the ones I wrote in raw HTML). It's worth noting that if you start with a Markdown document, translate it to HTML, then use html2text to go back to Markdown, it won't give you the exact same document you started with. That sort of complete round-trip fidelity simply is not possible, but html2text comes pretty close.
+
+Also, much like Markdown and SmartyPants, html2text works as a BBEdit text filter. Simply save a copy in the Unix Filters folder in your BBEdit Support folder.
+
+ [1]: http://www.aaronsw.com/2002/html2text/
Modified: branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/pod-coverage.t?rev=27202&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/pod-coverage.t (original)
+++ branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/pod-coverage.t Sun Nov 23 13:24:08 2008
@@ -9,6 +9,7 @@
get_elem_contents
|get_wiki_page
|get_attr_str
+ |elem_within_block
|is_camel_case
|rule
|rules
Modified: branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/runtests.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/runtests.pl?rev=27202&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/runtests.pl (original)
+++ branches/upstream/libhtml-wikiconverter-markdown-perl/current/t/runtests.pl Sun Nov 23 13:24:08 2008
@@ -76,15 +76,37 @@
my( $html, $wiki ) = split /__W__\n/, $test;
$html =~ s/__H__\n//;
+# $name =~ s{\s*\:\:(\w+\([^\)]*?\))}{
+# my $method_call = $1;
+# eval "\$wc->$method_call;";
+# die "Failed test call ($name): $@" if $@;
+# '';
+# }ge;
+
+ my( $todo, $todo_reason );
$name =~ s{\s*\:\:(\w+\([^\)]*?\))}{
- my $method_call = $1;
- eval "\$wc->$method_call;";
- die "Failed test call ($name): $@" if $@;
+ my $keyword = $1;
+ if( $keyword =~ /TODO\((\"|\')(.*?)\1/ ) {
+ $todo = 1;
+ $todo_reason = $2;
+ } else {
+ my $method_call = $keyword;
+ eval "\$wc->$method_call;";
+ die "Failed test call ($name): $@" if $@;
+ }
'';
}ge;
for( $html, $wiki ) { s/^\n+//; s/\n+$// }
- is( $wc->html2wiki($html), $wiki, $name );
+
+ if( $todo ) {
+ TODO: {
+ local $TODO = $todo_reason;
+ is( $wc->html2wiki($html), $wiki, $name );
+ }
+ } else {
+ is( $wc->html2wiki($html), $wiki, $name );
+ }
}
#file_test($wc) unless $minimal;
More information about the Pkg-perl-cvs-commits
mailing list