diff options
author | schmonz <schmonz@pkgsrc.org> | 2008-08-01 18:59:02 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2008-08-01 18:59:02 +0000 |
commit | 5a4d8d64fe2980fe819b83c8552b36ead316a102 (patch) | |
tree | 8c75cfa0139c627cd9cad9606a685efa004aa2f8 /textproc | |
parent | 3086d56b8a6081f7060ffbd0e18174f999eb694c (diff) | |
download | pkgsrc-5a4d8d64fe2980fe819b83c8552b36ead316a102.tar.gz |
Add patch from Debian package to provide creole_custombarelinks(). Bump
PKGREVISION.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/p5-Text-WikiCreole/Makefile | 3 | ||||
-rw-r--r-- | textproc/p5-Text-WikiCreole/distinfo | 3 | ||||
-rw-r--r-- | textproc/p5-Text-WikiCreole/patches/patch-aa | 81 |
3 files changed, 85 insertions, 2 deletions
diff --git a/textproc/p5-Text-WikiCreole/Makefile b/textproc/p5-Text-WikiCreole/Makefile index de25781a333..7faacebd147 100644 --- a/textproc/p5-Text-WikiCreole/Makefile +++ b/textproc/p5-Text-WikiCreole/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.1.1.1 2008/07/31 04:06:51 schmonz Exp $ +# $NetBSD: Makefile,v 1.2 2008/08/01 18:59:02 schmonz Exp $ # DISTNAME= Text-WikiCreole-0.05 +PKGREVISION= 1 PKGNAME= p5-${DISTNAME} CATEGORIES= textproc perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Text/} diff --git a/textproc/p5-Text-WikiCreole/distinfo b/textproc/p5-Text-WikiCreole/distinfo index 5f9ba9d5819..7262ada9b2a 100644 --- a/textproc/p5-Text-WikiCreole/distinfo +++ b/textproc/p5-Text-WikiCreole/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.1.1.1 2008/07/31 04:06:51 schmonz Exp $ +$NetBSD: distinfo,v 1.2 2008/08/01 18:59:02 schmonz Exp $ SHA1 (Text-WikiCreole-0.05.tar.gz) = 83793e0e058929727e0d114335d3ad33d3c4c92b RMD160 (Text-WikiCreole-0.05.tar.gz) = bb21e35e22afddba87ef85e41670bb45a9a17bac Size (Text-WikiCreole-0.05.tar.gz) = 11465 bytes +SHA1 (patch-aa) = 3a298775cdb24cbbe8afd86a8a544091dcf6ade3 diff --git a/textproc/p5-Text-WikiCreole/patches/patch-aa b/textproc/p5-Text-WikiCreole/patches/patch-aa new file mode 100644 index 00000000000..004695558c9 --- /dev/null +++ b/textproc/p5-Text-WikiCreole/patches/patch-aa @@ -0,0 +1,81 @@ +$NetBSD: patch-aa,v 1.1 2008/08/01 18:59:02 schmonz Exp $ + +--- lib/Text/WikiCreole.pm.orig 2007-10-11 17:56:06.000000000 -0400 ++++ lib/Text/WikiCreole.pm +@@ -1,7 +1,8 @@ + package Text::WikiCreole; + require Exporter; + @ISA = (Exporter); +-@EXPORT = qw(creole_parse creole_plugin creole_link creole_tag creole_img creole_customlinks creole_customimgs); ++@EXPORT = qw(creole_parse creole_plugin creole_tag creole_img creole_customimgs ++ creole_link creole_barelink creole_customlinks creole_custombarelinks); + use vars qw($VERSION); + use strict; + use warnings; +@@ -44,6 +45,8 @@ my $bol = '(?:^|\n)'; # beginning of lin + my $plugin_function; + # user-supplied link URL parser function + my $link_function; ++# user-supplied bare link parser function ++my $barelink_function; + # user-supplied image URL parser function + my $img_function; + +@@ -321,9 +324,12 @@ my %chunks = ( + curpat => '(?=(?:https?|ftp):\/\/)', + stops => '(?=[[:punct:]]?(?:\s|$))', + hint => ['h', 'f'], +- filter => sub { ++ filter => sub { + $_[0] =~ s/^\s*//o; + $_[0] =~ s/\s*$//o; ++ if($barelink_function) { ++ $_[0] = &$barelink_function($_[0]); ++ } + return "href=\"$_[0]\">$_[0]"; }, + open => "<a ", close=> "</a>", + }, +@@ -643,6 +649,22 @@ sub creole_customlinks { + } + } + ++sub creole_barelink { ++ return unless defined $_[0]; ++ $barelink_function = $_[0]; ++} ++ ++sub creole_custombarelinks { ++ $chunks{ilink}{open} = ""; ++ $chunks{ilink}{close} = ""; ++ $chunks{ilink}{filter} = sub { ++ if($barelink_function) { ++ $_[0] = &$barelink_function($_[0]); ++ } ++ return $_[0]; ++ } ++} ++ + sub creole_customimgs { + $chunks{img}{open} = ""; + $chunks{img}{close} = ""; +@@ -756,6 +778,20 @@ reads Creole 1.0 markup and returns XHTM + + This has no effect on "bare" link markup, such as http://cpan.org. + ++=head2 creole_barelink ++ ++ Same purpose as creole_link, but for "bare" link markup. ++ ++ sub mybarelink { ++ return "$_[0].html"; ++ return $_[0]; ++ } ++ creole_barelink \&mybarelink; ++ ++=head2 creole_custombarelinks ++ ++ Same purpose as creole_customlinks, but for "bare" link markup. ++ + =head2 creole_img + + Same purpose as creole_link, but for image URLs. |