# HG changeset patch
# User smith@nwoca.org
# Date 1296581685 18000
# Node ID c8442e0eff84328ad52bd6689dc247746f153dea
# Parent cf58f4b9902b588af438a4e504fa59af47509ba2
Remove
tags. Generlized {table} around {code} blocks.
diff -r cf58f4b9902b -r c8442e0eff84 src/org/nwoca/ssdt/tools/html2wiki/Html2Wiki.java
--- a/src/org/nwoca/ssdt/tools/html2wiki/Html2Wiki.java Fri Jan 28 16:32:04 2011 -0500
+++ b/src/org/nwoca/ssdt/tools/html2wiki/Html2Wiki.java Tue Feb 01 12:34:45 2011 -0500
@@ -38,6 +38,7 @@
transformers.add(new DeleteTransformer("|"));
transformers.add(new DeleteTransformer("(?m)^\\*"));
transformers.add(new DeleteTransformer("(?m)
$"));
+ transformers.add(new DeleteTransformer(".*")); // remove SDML captions (used for TOC)
transformers.add(new DeleteTransformer("|"));
transformers.add(new CloseTagTransformer("","(\n|\r)*(|||"));
transformers.add(new BadTableDataTransformer());
@@ -87,8 +88,8 @@
transformers.add(new ReplaceTransformer("\\{td\\}\\n\\s{2}\\{tr\\}\\n\\{table\\}\\n\\{center\\}","{info}"));
//Remove unnecessary table surrounding code blocks.
- transformers.add(new ReplaceTransformer("\\{table:.*\\}\\n\\s{2}\\{tr\\}\\n\\s{4}\\{td\\}\\n\\s{6}\\n{0,1}\\{code\\}","{code}"));
- transformers.add(new ReplaceTransformer("\\{code\\}\\n\\{td\\}\\{tr\\}\\{table\\}","{code}"));
+ transformers.add(new ReplaceTransformer("\\{table:.*\\}(\\n|\\s|\\{t.\\}|\\*\\S*\\*)*\\{code\\}","{code}"));
+ transformers.add(new ReplaceTransformer("\\{code\\}(\\n|\\{t.\\}|\\s)*\\{table\\}","{code}"));
//Change borderStyle of code window for "screenshots" to none.
transformers.add(new TagTransformer("\\{code\\}([\\s\\n]*?_______________)", true, "{code:borderStyle=none}", ""));
diff -r cf58f4b9902b -r c8442e0eff84 test/org/nwoca/ssdt/tools/html2wiki/Html2WikiTest.java
--- a/test/org/nwoca/ssdt/tools/html2wiki/Html2WikiTest.java Fri Jan 28 16:32:04 2011 -0500
+++ b/test/org/nwoca/ssdt/tools/html2wiki/Html2WikiTest.java Tue Feb 01 12:34:45 2011 -0500
@@ -58,7 +58,7 @@
//
// File path = new File(Html2WikiTest.class.getResource("/resources").toURI());
// System.out.println(path);
- Html2Wiki.main( new String[] {path.toString(), "OECN System Managers Handbook"});
+ Html2Wiki.main( new String[] {path.toString(), ""});
//
}
}