Merge commit '1a8cbf526cdc7e77bfa084e266b8633858b68a09' into sipb
authorAnders Kaseorg <andersk@mit.edu>
Fri, 31 Jan 2014 05:55:36 +0000 (00:55 -0500)
committerAnders Kaseorg <andersk@mit.edu>
Fri, 31 Jan 2014 05:55:36 +0000 (00:55 -0500)
Conflicts:
templates/page.tmpl

1  2 
IkiWiki/CGI.pm
IkiWiki/Plugin/git.pm
IkiWiki/Plugin/httpauth.pm
IkiWiki/Plugin/mdwn.pm

diff --cc IkiWiki/CGI.pm
Simple merge
index 7896625dffdb8086ce8fa1f6270548fdf435e236,0c0e27521aa55d0381041e75721a618e1f55cf43..1a6775c36cc8b7b82eb18f90cbf956780ad43c39
@@@ -4,8 -4,8 +4,9 @@@ package IkiWiki::Plugin::git
  use warnings;
  use strict;
  use IkiWiki;
 +use IkiWiki::UserInfo;
  use Encode;
+ use URI::Escape q{uri_escape_utf8};
  use open qw{:utf8 :std};
  
  my $sha1_pattern     = qr/[0-9a-fA-F]{40}/; # pattern to validate Git sha1sums
index 817c2b48719fcaf5cbcdd37d074cf6e301081411,76d574b2a899df7e77cb71f2a4f27ee078e76b43..7028130eefe8b62a0659588ec94d1fedc028eae8
@@@ -5,9 -5,9 +5,10 @@@ package IkiWiki::Plugin::httpauth
  use warnings;
  use strict;
  use IkiWiki 3.00;
 +use Data::Dumper;
  
  sub import {
+       hook(type => "checkconfig", id => "httpauth", call => \&checkconfig);
        hook(type => "getsetup", id => "httpauth", call => \&getsetup);
        hook(type => "auth", id => "httpauth", call => \&auth);
        hook(type => "formbuilder_setup", id => "httpauth",
index 68765c6b8c0c71fb4a1d75992a51290522134d90,430194bffdcc6444f34036709d9dc3767187af85..b7ed2c5081df90f447a2bcb3cf3187b10c263d71
@@@ -50,9 -57,28 +57,28 @@@ sub htmlize (@) 
                                }
                        }
                }
+               if (! defined $markdown_sub &&
+                   (! exists $config{nodiscount} || ! $config{nodiscount})) {
+                       eval q{use Text::Markdown::Discount};
+                       if (! $@) {
+                               $markdown_sub=sub {
+                                       my $t=shift;
+                                       # Workaround for discount binding bug
+                                       # https://rt.cpan.org/Ticket/Display.html?id=73657
+                                       return "" if $t=~/^\s*$/;
+                                       # Workaround for discount's eliding
+                                       # of <style> blocks.
+                                       # https://rt.cpan.org/Ticket/Display.html?id=74016
+                                       $t=~s/<style/<elyts/ig;
+                                       my $r=Text::Markdown::Discount::markdown($t);
+                                       $r=~s/<elyts/<style/ig;
+                                       return $r;
+                               }
+                       }
+               }
                if (! defined $markdown_sub) {
                        eval q{use Text::Markdown};
 -                      if (! $@) {
 +                      if (1) {#! $@) {  # Text::Markdown throws this but works.  Shrug.
                                if (Text::Markdown->can('markdown')) {
                                        $markdown_sub=\&Text::Markdown::markdown;
                                }