You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jo...@apache.org on 2014/03/20 04:41:28 UTC

svn commit: r1579525 - in /thrift/cms-site/trunk/lib: path.pm view.pm

Author: joes
Date: Thu Mar 20 03:41:28 2014
New Revision: 1579525

URL: http://svn.apache.org/r1579525
Log:
faster

Modified:
    thrift/cms-site/trunk/lib/path.pm
    thrift/cms-site/trunk/lib/view.pm

Modified: thrift/cms-site/trunk/lib/path.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/path.pm?rev=1579525&r1=1579524&r2=1579525&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Thu Mar 20 03:41:28 2014
@@ -18,8 +18,8 @@ our @patterns = (
         headers    => { title => "Index" },
         preprocess => 1,
     }],
-    [qr/\.md(?:text)?$/, thrift_preprocessor => {
-        view       => 'single_narrative',
+    [qr/\.md(?:text)?$/, memoize => {
+        view       => 'thrift_preprocessor',
         conf       => $conf,
         template   => 'default.html',
         preprocess => 1,

Modified: thrift/cms-site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/view.pm?rev=1579525&r1=1579524&r2=1579525&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/view.pm (original)
+++ thrift/cms-site/trunk/lib/view.pm Thu Mar 20 03:41:28 2014
@@ -11,6 +11,7 @@ sub thrift_preprocessor {
     my $file = "content$args{path}";
     read_text_file $file, \%args;
     delete $args{header};
+    delete $args{view};
 
     my $key = "_snippet_a";
     $args{content} =~ s{\[XXXsnippet:([^\]]+)\]}
@@ -25,7 +26,7 @@ sub thrift_preprocessor {
                            "{{ " . $key++ . ".fetch }}";
                        }ge;
 
-    return view->can("memoize")->(%args);
+    return view->can("single_narrative")->(%args);
 }
 
 1;