Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Apr 2014 21:47:51 +0000 (UTC)
From:      Dag-Erling Smørgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r264567 - user/des/fbp/lib/Template/Plugin
Message-ID:  <201404162147.s3GLlpdx055429@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Wed Apr 16 21:47:51 2014
New Revision: 264567
URL: http://svnweb.freebsd.org/changeset/base/264567

Log:
  Set a custom syntax for literal blocks.  The default whitespace magic
  doesn't work well with diffs.

Modified:
  user/des/fbp/lib/Template/Plugin/WikiFormat.pm

Modified: user/des/fbp/lib/Template/Plugin/WikiFormat.pm
==============================================================================
--- user/des/fbp/lib/Template/Plugin/WikiFormat.pm	Wed Apr 16 21:47:11 2014	(r264566)
+++ user/des/fbp/lib/Template/Plugin/WikiFormat.pm	Wed Apr 16 21:47:51 2014	(r264567)
@@ -16,6 +16,20 @@ use Text::WikiFormat;
 
 L<Template::Toolkit> filter plugin for L<Text::WikiFormat>
 
+=cut
+
+our $TAGS = {
+    blocks => {
+	code => qr/^: /,
+    },
+};
+
+our $OPTIONS = {
+    absolute_links => 1,
+    implicit_links => 0,
+    extended => 1,
+};
+
 =head1 METHODS
 
 =head2 init
@@ -43,8 +57,7 @@ sub filter($$) {
     my ($self, $raw) = @_;
 
     print(STDERR "Template::Plugin::WikiFormat::filter()\n");
-    return Text::WikiFormat::format($raw, {}, {
-	implicit_links => 0, extended => 1, absolute_links => 1 });
+    return Text::WikiFormat::format($raw, $TAGS, $OPTIONS);
 }
 
 =head1 AUTHOR



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404162147.s3GLlpdx055429>