Mercurial > public > html2wiki
changeset 13:cf58f4b9902b
clean up ending {li} on line by itself
author | smith@nwoca.org |
---|---|
date | Fri, 28 Jan 2011 16:32:04 -0500 |
parents | c1d94c623854 |
children | c8442e0eff84 |
files | src/org/nwoca/ssdt/tools/html2wiki/Html2Wiki.java |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/nwoca/ssdt/tools/html2wiki/Html2Wiki.java Fri Jan 28 14:12:34 2011 -0500 +++ b/src/org/nwoca/ssdt/tools/html2wiki/Html2Wiki.java Fri Jan 28 16:32:04 2011 -0500 @@ -63,7 +63,8 @@ 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 ReplaceTransformer("\\n\\s*</li>","{li}\n")); // remove leading space from </li> + transformers.add(new ReplaceTransformer("</li>","{li}\n")); // Replace remaining </li> transformers.add(new ChapterTransformer(category)); transformers.add(new TagTransformer("<pre>(.*?)</pre>", true, "{code}","{code}")); @@ -106,7 +107,7 @@ transformers.add(new ReplaceTransformer(""","\"")); transformers.add(new ReplaceTransformer("&","&")); transformers.add(new ReplaceTransformer(":\\)",": )")); // No smilies... - transformers.add(new ReplaceTransformer("(\\w)(--)(\\w)"," -- ",2)); + transformers.add(new ReplaceTransformer("(\\w)(--)(\\w)"," -- ",2)); // avoid strikeout }