fix indent[] handling and don't abuse ul anymore
authorTony Cook <tony@develop-help.com>
Thu, 24 Oct 2013 04:30:34 +0000 (15:30 +1100)
committerTony Cook <tony@develop-help.com>
Sun, 3 Nov 2013 23:20:23 +0000 (10:20 +1100)
site/cgi-bin/modules/DevHelp/Formatter.pm
t/010-modules/050-format.t

index dd9d71cccb9093e548f66b0313b1402f5790bd0e..160d9b44afb155ab9be1b93dcd881325198bc1e0 100644 (file)
@@ -392,7 +392,7 @@ sub format {
                      + # one or more times
                    )(\n|$)?)("\n\n"._format_lists($1)."\n\n")egx
          and next TRY;
-       $part =~ s#indent\[([^\]\[]+)\]#<ul>$1</ul>#ig
+       $part =~ s#indent\[([^\]\[]+)\]#\n\n\x02<div class="indent">$1</div>\x03\n\n#ig
          and next TRY;
        $part =~ s#center\[([^\]\[]+)\]#<center>$1</center>#ig
          and next TRY;
index 9654686748987caefbe1d67292152a9f22fbf50d..d86e726db7824ace690f26aa4aa514cd8ffbc1db 100644 (file)
@@ -570,7 +570,7 @@ IN
 </ul>
 OUT
 
-  format_test 'indent[text]', '<ul>text</ul>', 'indent';
+  format_test 'indent[text]', '<div class="indent">text</div>', 'indent';
   format_test 'center[text]', '<center>text</center>', 'center';
   format_test 'hrcolor[80|10|#FF0000]', <<OUT, 'hrcolor', 'out';
 <table width="80" height="10" border="0" bgcolor="#FF0000" cellpadding="0" cellspacing="0"><tr><td><img src="/images/trans_pixel.gif" width="1" height="1" alt="" /></td></tr></table>