From owner-svn-src-user@FreeBSD.ORG Wed Apr 16 21:47:52 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00DE9120; Wed, 16 Apr 2014 21:47:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E22AA1560; Wed, 16 Apr 2014 21:47:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3GLlpTM055430; Wed, 16 Apr 2014 21:47:51 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3GLlpdx055429; Wed, 16 Apr 2014 21:47:51 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201404162147.s3GLlpdx055429@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 16 Apr 2014 21:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r264567 - user/des/fbp/lib/Template/Plugin X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2014 21:47:52 -0000 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 filter plugin for L +=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