make wmd comment support comment editing (I think)
authorJoey Hess <joey@gnu.kitenet.net>
Sat, 7 Mar 2009 23:54:26 +0000 (18:54 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Sat, 7 Mar 2009 23:54:26 +0000 (18:54 -0500)
IkiWiki/Plugin/wmd.pm
templates/editcomment.tmpl

index 3372ffe38dc35c115829eceba24e06d165045e4b..9e9f17f7f635edc87265f8b9be1e1fdbb99a1390 100644 (file)
@@ -26,8 +26,9 @@ sub formbuilder_setup (@) {
 
        return if ! defined $form->field("do");
        
-       return unless (($form->field("do") eq "edit") ||
-                               ($form->field("do") eq "create"));
+       return unless $form->field("do") eq "edit" ||
+                       $form->field("do") eq "create" ||
+                       $form->field("do") eq "comment";
 
        $form->tmpl_param("wmd_preview", "<div class=\"wmd-preview\"></div>\n".
                include_javascript(undef, 1));
index 891bcae65deb43ddb31aa87141c0dc906f4107e8..7590cdfd7d73c0cbf989fc5a0e82e9ea8b39cad3 100644 (file)
@@ -15,6 +15,7 @@ Subject: <TMPL_VAR FIELD-SUBJECT><br />
 <TMPL_VAR FORM-SUBMIT> <TMPL_VAR FIELD-TYPE> <TMPL_VAR HELPONFORMATTINGLINK><br />
 IkiWiki directives ([[!directive]]) are <TMPL_UNLESS NAME="ALLOWDIRECTIVES">not </TMPL_UNLESS>allowed in comments on this wiki.<br />
 <TMPL_VAR NAME="FORM-END">
+<TMPL_VAR WMD_PREVIEW>
 
 <TMPL_IF NAME="PAGE_PREVIEW">
 <hr />