[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Text-Markdown-Discount



Alessandro Ghedini wrote:
> AFAICT that module is abandoned and uses a quite outdated version of 
> discount (it uses v1.3.4 vs. upstream v2.1.2). The maintainer of the module 
> has also been contacted, but didn't responded [0]. IMHO it isn't a much
> valid candidate for Debian as it is now.
> 
> I'd be ok helping with (or completely taking over) its development (/me 
> being maintainer of discount in Debian) if the current developer responded,
> or developing an alternative if that turns out to be not possible as it 
> looks like right now (I have already planned to do a Text::Markdown::XS 
> based on discount since the Text::Markdown::Discount development is not
> mushc active, but I never managed to start coding it).

AFAICS, none of the API it uses has actually changed between 1.3 and 2.1.

Attached patch makes it build with libmarkdown2-dev rather than the
bundled library. (I also did a rm -rf discount-1.3.4 just to be sure.)

> IIRC there are a couple of places where sundown is inferior if compared to 
> discount (the ones that I noticed), like the autolink feature (which is not 
> much flexible) and the supported markdown extensions (and of course 
> documentation). 

Personally I want no markdown extensions because I've already changed
markdown engines 3 times and they just serve to lock you in to a particular
engine. (I prefer, instead, to lock people into ikiwiki :-)

It would be a nice extension to the discount perl bindings to expose the
various extension flags so they could all be turned off. Thankfully
it already comes with MKD_NOHEADER|MKD_NOPANTS.

> I never used it extensively so I cannot comment further, but apart from the 
> above shortcomings it looks like a valid Markdown implementation (I can't
> tell if it's faster or more secure than discount though).

Defintely much faster, I also liked that it seems to be coded with constant
memory use in mind. Since it's based on upskirt, it may be possible to
adapt this perl module to it.
http://search.cpan.org/~simcop/Text-Upskirt-0.100/lib/Text/Upskirt.pm

-- 
see shy jo
diff -ur 2/Text-Markdown-Discount-0.01/Makefile.PL Text-Markdown-Discount-0.01/Makefile.PL
--- 2/Text-Markdown-Discount-0.01/Makefile.PL	2009-10-19 18:38:26.000000000 -0400
+++ Text-Markdown-Discount-0.01/Makefile.PL	2012-01-01 17:50:45.049822343 -0400
@@ -4,10 +4,7 @@
 use ExtUtils::MakeMaker;
 use File::Spec;
 
-my $extdir = 'discount-1.3.4';
-my $myextlib = File::Spec->catfile($extdir, 'libmarkdown.a');
 my $clean_files = join (" ",
-                  map{ File::Spec->catfile($extdir, $_) }
                   qw ( 
                   markdwon mkd2html makepage theme libmarkdown.a
                   Csio.o
@@ -36,12 +33,6 @@
 
 
 
-sub MY::postamble {
-    return sprintf('
-$(MYEXTLIB):
-	%s
-', qq{( cd $extdir; sh configure.sh; make )\n});
-}
 
 WriteMakefile(
     NAME              => 'Text::Markdown::Discount',
@@ -50,8 +41,6 @@
     ($] >= 5.005 ?
       (ABSTRACT_FROM  => 'lib/Text/Markdown/Discount.pm',
        AUTHOR         => 'Masayoshi Sekimura <sekimura@cpan.org>') : ()),
-    LIBS               => '-L' . $extdir,
-    INC               => '-I. -I' . $extdir,
-    MYEXTLIB          => $myextlib,
+    MYEXTLIB          => "/usr/lib/libmarkdown.so",
     clean             => { FILES => $clean_files },
 );

Attachment: signature.asc
Description: Digital signature


Reply to: