Index: stf.tags
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/reptag/tags/stf.tags,v
retrieving revision 1.5.4.2
diff -u -r1.5.4.2 stf.tags
--- stf.tags	26 Feb 2007 21:07:45 -0000	1.5.4.2
+++ stf.tags	3 Mar 2007 15:19:09 -0000
@@ -90,12 +90,14 @@
   //process format tags
   $text = preg_replace(array_keys($tags), array_values($tags), $text);
   //numbered item list
-  $text = preg_replace('#\n([0-9\#]{1})([\.\)]{1})[\s]*(.*?)\n([0-9\#]{1})#m', "\n<ol>\n\\1\\2 \\3\n\\4", $text);
-  $text = preg_replace('#\n([0-9\#]{1})([\.\)]{1})[\s]*(.*?)\n([^0-9\#|\n])#m', "\n\\1\\2 \\3\n\n</ol>\n\\4", $text);
+  $text = preg_replace('#\n([0-9\#]{1}[\.\)]{1}[\s]*.*?\n[0-9\#]{1})#m', "\n<ol>\n\\1", $text);
+  $text = preg_replace('#\n([0-9\#]{1}[\.\)]{1}[\s]*.*?)\n([^0-9\#|\n])#m', "\n\\1\n</ol>\n\\2", $text);
+  $text = preg_replace('#</ol>[\n]{0,1}<ol>#m', "", $text);
   $text = preg_replace_callback('#^[0-9\#]{1}[\.\)]{1}[\s]*(.*?)\n#m', '_reptag_stf_item_list', $text);
   //not numbered item list
-  $text = preg_replace('#\n([\*\-\+]{1})[\s]*(.*?)\n([\*\-\+]{1})#m', "\n<ul>\n\\1 \\2\n\\3", $text);
-  $text = preg_replace('#\n([\*\-\+]{1})[\s]*(.*?)\n([^\*\-\+|\n])#m', "\n\\1 \\2\n\n</ul>\n\\3", $text);
+  $text = preg_replace('#\n([\*\-\+]{1}[\s]*.*?\n[\*\-\+]{1})#m', "\n<ul>\n\\1", $text);
+  $text = preg_replace('#\n([\*\-\+]{1}[\s]*.*?)\n([^\*\-\+|\n])#m', "\n\\1\n</ul>\n\\2", $text);
+  $text = preg_replace('#</ul>[\n]{0,1}<ul>#m', "", $text);
   $text = preg_replace_callback('#^[\*\-\+]{1}[\s]*(.*?)\n#m', '_reptag_stf_item_list', $text);
   //item table
   $text = preg_replace('#\n\|([\s]*(.*?)[\s]*\|)[\s]*\n([\|]{1})#m', "\n<table>\n|\\1\n\\3", $text);
@@ -125,7 +127,7 @@
 }
 
 function _reptag_stf_item_list($matches) {
-  return "\n  <li>".$matches[1]."</li>";
+  return "  <li>".$matches[1]."</li>\n";
 }
 
 function _reptag_stf_item_table($matches) {
@@ -142,6 +144,7 @@
     $output .= "  </tr>\n";
   }
   $output .= "</table>\n";
+  
   return $output;
 }
 
