From: axelcl Date: Sun, 13 Feb 2005 19:09:48 +0000 (+0000) Subject: fixed bug with some attributes X-Git-Url: http://secure.phpeclipse.com fixed bug with some attributes --- diff --git a/archive/net.sourceforge.phpeclipse.wiki/lib/plog4u.jar b/archive/net.sourceforge.phpeclipse.wiki/lib/plog4u.jar index 590d991..998ae20 100644 Binary files a/archive/net.sourceforge.phpeclipse.wiki/lib/plog4u.jar and b/archive/net.sourceforge.phpeclipse.wiki/lib/plog4u.jar differ diff --git a/archive/org.plog4u.wiki.test/src/org/plog4u/wiki/test/filter/FontFilterTest.java b/archive/org.plog4u.wiki.test/src/org/plog4u/wiki/test/filter/FontFilterTest.java new file mode 100644 index 0000000..ce69e1c --- /dev/null +++ b/archive/org.plog4u.wiki.test/src/org/plog4u/wiki/test/filter/FontFilterTest.java @@ -0,0 +1,37 @@ +package org.plog4u.wiki.test.filter; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.plog4u.wiki.filter.WikipediaFilter; + +public class FontFilterTest extends FilterTestSupport { + public FontFilterTest(String name) { + super(name); + } + + protected void setUp() throws Exception { + filter = new WikipediaFilter(); + super.setUp(); + } + + public static Test suite() { + return new TestSuite(FontFilterTest.class); + } + + public void testFont1() { + assertEquals("Text", filter.filter("Text", context)); + } + + public void testFont2() { + assertEquals("Text", filter.filter("Text", context)); + } + + public void testFont3() { + assertEquals("Text", filter.filter("Text", context)); + } + + public void testFont4() { + assertEquals("Text", filter.filter("Text", context)); + } +} \ No newline at end of file diff --git a/archive/org.plog4u.wiki.test/src/org/plog4u/wiki/test/filter/WrongTagFilterTest.java b/archive/org.plog4u.wiki.test/src/org/plog4u/wiki/test/filter/WrongTagFilterTest.java new file mode 100644 index 0000000..d4bff50 --- /dev/null +++ b/archive/org.plog4u.wiki.test/src/org/plog4u/wiki/test/filter/WrongTagFilterTest.java @@ -0,0 +1,26 @@ +package org.plog4u.wiki.test.filter; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.plog4u.wiki.filter.WikipediaFilter; + +public class WrongTagFilterTest extends FilterTestSupport { + public WrongTagFilterTest(String name) { + super(name); + } + + protected void setUp() throws Exception { + filter = new WikipediaFilter(); + super.setUp(); + } + + public static Test suite() { + return new TestSuite(WrongTagFilterTest.class); + } + + public void testWrongTag1() { + assertEquals("<blubber>...", filter.filter("...", context)); + } + +} \ No newline at end of file diff --git a/archive/org.plog4u.wiki/src/org/plog4u/wiki/filter/WikipediaParser.java b/archive/org.plog4u.wiki/src/org/plog4u/wiki/filter/WikipediaParser.java index 2e04285..f0a4790 100644 --- a/archive/org.plog4u.wiki/src/org/plog4u/wiki/filter/WikipediaParser.java +++ b/archive/org.plog4u.wiki/src/org/plog4u/wiki/filter/WikipediaParser.java @@ -443,7 +443,7 @@ public class WikipediaParser { fResultBuffer.append("<"); fResultBuffer.append(token.getTagName()); fTokenStack.push(token); - fCurrentPosition = token.scan(fResultBuffer, fSource, fCurrentPosition - 1); + fCurrentPosition = token.scan(fResultBuffer, fSource, fCurrentPosition); fResultBuffer.append(">"); return WikipediaFilter.TokenIgnore; } @@ -912,16 +912,17 @@ public class WikipediaParser { // table // syntax continue; - } else { - if (readUntilChar('}')) { - String macroStartTag; - - macroStartTag = new String(fSource, startMacroPosition, fCurrentPosition - startMacroPosition - 1); - if (macroStartTag != null) { - createMacro(startMacroPosition, macroStartTag); - continue; - } - } +// } else { +// SnipSnap / Radeox Macro Syntax +// if (readUntilChar('}')) { +// String macroStartTag; +// +// macroStartTag = new String(fSource, startMacroPosition, fCurrentPosition - startMacroPosition - 1); +// if (macroStartTag != null) { +// createMacro(startMacroPosition, macroStartTag); +// continue; +// } +// } } break; case '<':