diff --git a/source/de/anomic/data/wikiCode.java b/source/de/anomic/data/wikiCode.java index 1c7505c6d..26d026108 100644 --- a/source/de/anomic/data/wikiCode.java +++ b/source/de/anomic/data/wikiCode.java @@ -170,11 +170,11 @@ public class wikiCode { result.substring(p1 + 2); } - if ((p0 = result.indexOf("''''")) >= 0) { - p1 = result.indexOf("''''", p0 + 4); + if ((p0 = result.indexOf("'''''")) >= 0) { + p1 = result.indexOf("'''''", p0 + 5); if (p1 >= 0) result = result.substring(0, p0) + "" + - result.substring(p0 + 4, p1) + "" + - result.substring(p1 + 4); + result.substring(p0 + 5, p1) + "" + + result.substring(p1 + 5); } if ((p0 = result.indexOf("'''")) >= 0) { p1 = result.indexOf("'''", p0 + 3); @@ -332,7 +332,7 @@ public class wikiCode { kl = result.substring(p0 + 2, p1); // this is the part of the code that's responsible for images - // contibuted by [MN] + // contributed by [MN] if(kl.startsWith("Image:")){ alt = ""; align = ""; @@ -400,7 +400,8 @@ public class wikiCode { //escape code ([=...=]) contributed by [MN] //both [= and =] in the same line - else if(((p0 = result.indexOf("[="))>=0)&&((p1 = result.indexOf("=]"))>=0)&&(!(preformatted))){ + else if(((p0 = result.indexOf("[="))>=0)&&((p1 = result.indexOf("=]"))>0)&&(!(preformatted))){ + //if(p0 < p1){ String escapeText = result.substring(p0+2,p1); //BUGS TO BE FIXED: [=[=text=]=] does not work properly: @@ -409,9 +410,13 @@ public class wikiCode { // //handlicg cases where the text inside [= and =] also contains //[= and =]. Example: [=[=...=]=] + //if(escapeText) - result = transformLine(result.substring(0,p0)+"!escape!!Text!"+result.substring(p1+2), switchboard); - result = result.replaceAll("!escape!!Text!", escapeText); + //else{ + result = transformLine(result.substring(0,p0)+"!escape!!Text!"+result.substring(p1+2), switchboard); + result = result.replaceAll("!escape!!Text!", escapeText); + //} + //} } //start [= @@ -450,10 +455,12 @@ public class wikiCode { //preformatted code (
...
) contributed by [MN] //implementation very similar to escape code (see above) //both
 and 
in the same line - else if(((p0 = result.indexOf("<pre>"))>=0)&&((p1 = result.indexOf("</pre>"))>=0)&&(!(escaped))){ - String preformattedText = "
"+result.substring(p0+11,p1)+"
"; - result = transformLine(result.substring(0,p0)+"!preformatted!!Text!"+result.substring(p1+12), switchboard); - result = result.replaceAll("!preformatted!!Text!", preformattedText); + else if(((p0 = result.indexOf("<pre>"))>=0)&&((p1 = result.indexOf("</pre>"))>0)&&(!(escaped))){ + //if(p0 < p1){ + String preformattedText = "
"+result.substring(p0+11,p1)+"
"; + result = transformLine(result.substring(0,p0)+"!preformatted!!Text!"+result.substring(p1+12), switchboard); + result = result.replaceAll("!preformatted!!Text!", preformattedText); + //} } //start