changeset 5:d34f4d408ef9

[no commit message]
author ferrall@nwoca.org
date Thu, 27 Jan 2011 14:32:34 -0500
parents 22ed6d93442c
children 99f293bd507f
files src/org/nwoca/ssdt/tools/html2wiki/Html2Wiki.java
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/nwoca/ssdt/tools/html2wiki/Html2Wiki.java	Tue Jan 25 21:59:31 2011 -0500
+++ b/src/org/nwoca/ssdt/tools/html2wiki/Html2Wiki.java	Thu Jan 27 14:32:34 2011 -0500
@@ -57,12 +57,13 @@
         transformers.add(new ReplaceTransformer("<br>","\\\\"));
         transformers.add(new ReplaceTransformer("<table.*?>|</table>","{table}"));
         transformers.add(new ReplaceTransformer("<tr>|</tr>","{tr}"));
-        transformers.add(new ReplaceTransformer("<td>|</td>","{td}"));
-        transformers.add(new ReplaceTransformer("<th>|</th>","{th}"));
+        transformers.add(new ReplaceTransformer("<td.*?>|</td>","{td}"));
+        transformers.add(new ReplaceTransformer("<th.*?>|</th>","{th}"));
         transformers.add(new ReplaceTransformer("<ol.*?>|</ol>","{ol}"));
         transformers.add(new ReplaceTransformer("<ul.*?>|</ul>","{ul}"));
         transformers.add(new ReplaceTransformer("<li>","{li}"));
         transformers.add(new ReplaceTransformer("</li>","{li}\n"));
+        
         transformers.add(new ChapterTransformer(category));
         transformers.add(new TagTransformer("<pre>(.*?)</pre>", true, "{code}","{code}"));
         transformers.add(new TagTransformer("<center>(.*?)</center>", true, "{center}","{center}"));
@@ -77,6 +78,12 @@
         transformers.add(new TagTransformer("<h4>(.*)</h4>",    "h4. ",   ""));
         transformers.add(new TagTransformer("<h5>(.*)</h5>",    "h5. ",  ""));
         transformers.add(new TagTransformer("<h6>(.*)</h6>",    "h6. ", ""));
+        transformers.add(new ReplaceTransformer("\\{center}\\n\\{table}\\n\\{tr\\}\\n\\s{2}\\{td\\}\\{center\\}\\*Note\\*\\{center\\}","{note}"));
+        transformers.add(new ReplaceTransformer("\\{td\\}\\n\\s{2}\\{tr\\}\\n\\{table\\}\\n\\{center\\}","{note}"));
+
+//        transformers.add(new TagTransformer("\\{center}\\n\\{table}\\n\\{tr\\}\\n\\s{2}\\{td\\}\\{center\\}\\*Note\\*\\{center\\}(.*?)\\s\\{td\\}\\n\\s{2}\\{tr\\}\\{table\\}",    "{note}",  "{note}"));
+//        transformers.add(new TagTransformer("(\\S)\\s\\n",    "", " "));
+        transformers.add(new TagTransformer("<blockquote>(.*)</blockquote>",    "{quote}", "{quote}"));
         transformers.add(new DeleteTransformer("(?s)<hr.*?>"));
      
     }