@ -170,11 +170,11 @@ public class wikiCode {
result . substring ( p1 + 2 ) ;
result . substring ( p1 + 2 ) ;
}
}
if ( ( p0 = result . indexOf ( "'''' ") ) > = 0 ) {
if ( ( p0 = result . indexOf ( "'''' ' ") ) > = 0 ) {
p1 = result . indexOf ( "'''' ", p0 + 4 ) ;
p1 = result . indexOf ( "'''' '", p0 + 5 ) ;
if ( p1 > = 0 ) result = result . substring ( 0 , p0 ) + "<b><i>" +
if ( p1 > = 0 ) result = result . substring ( 0 , p0 ) + "<b><i>" +
result . substring ( p0 + 4 , p1 ) + "</i></b>" +
result . substring ( p0 + 5 , p1 ) + "</i></b>" +
result . substring ( p1 + 4 ) ;
result . substring ( p1 + 5 ) ;
}
}
if ( ( p0 = result . indexOf ( "'''" ) ) > = 0 ) {
if ( ( p0 = result . indexOf ( "'''" ) ) > = 0 ) {
p1 = result . indexOf ( "'''" , p0 + 3 ) ;
p1 = result . indexOf ( "'''" , p0 + 3 ) ;
@ -332,7 +332,7 @@ public class wikiCode {
kl = result . substring ( p0 + 2 , p1 ) ;
kl = result . substring ( p0 + 2 , p1 ) ;
// this is the part of the code that's responsible for images
// this is the part of the code that's responsible for images
// cont ibuted by [MN]
// cont r ibuted by [MN]
if ( kl . startsWith ( "Image:" ) ) {
if ( kl . startsWith ( "Image:" ) ) {
alt = "" ;
alt = "" ;
align = "" ;
align = "" ;
@ -400,7 +400,8 @@ public class wikiCode {
//escape code ([=...=]) contributed by [MN]
//escape code ([=...=]) contributed by [MN]
//both [= and =] in the same line
//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 ) ;
String escapeText = result . substring ( p0 + 2 , p1 ) ;
//BUGS TO BE FIXED: [=[=text=]=] does not work properly:
//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
//handlicg cases where the text inside [= and =] also contains
//[= and =]. Example: [=[=...=]=]
//[= and =]. Example: [=[=...=]=]
//if(escapeText)
//else{
result = transformLine ( result . substring ( 0 , p0 ) + "!escape!!Text!" + result . substring ( p1 + 2 ) , switchboard ) ;
result = transformLine ( result . substring ( 0 , p0 ) + "!escape!!Text!" + result . substring ( p1 + 2 ) , switchboard ) ;
result = result . replaceAll ( "!escape!!Text!" , escapeText ) ;
result = result . replaceAll ( "!escape!!Text!" , escapeText ) ;
//}
//}
}
}
//start [=
//start [=
@ -450,10 +455,12 @@ public class wikiCode {
//preformatted code (<pre>...</pre>) contributed by [MN]
//preformatted code (<pre>...</pre>) contributed by [MN]
//implementation very similar to escape code (see above)
//implementation very similar to escape code (see above)
//both <pre> and </pre> in the same line
//both <pre> and </pre> in the same line
else if ( ( ( p0 = result . indexOf ( "<pre>" ) ) > = 0 ) & & ( ( p1 = result . indexOf ( "</pre>" ) ) > = 0 ) & & ( ! ( escaped ) ) ) {
else if ( ( ( p0 = result . indexOf ( "<pre>" ) ) > = 0 ) & & ( ( p1 = result . indexOf ( "</pre>" ) ) > 0 ) & & ( ! ( escaped ) ) ) {
//if(p0 < p1){
String preformattedText = "<pre style=\"border:dotted;border-width:thin\">" + result . substring ( p0 + 11 , p1 ) + "</pre>" ;
String preformattedText = "<pre style=\"border:dotted;border-width:thin\">" + result . substring ( p0 + 11 , p1 ) + "</pre>" ;
result = transformLine ( result . substring ( 0 , p0 ) + "!preformatted!!Text!" + result . substring ( p1 + 12 ) , switchboard ) ;
result = transformLine ( result . substring ( 0 , p0 ) + "!preformatted!!Text!" + result . substring ( p1 + 12 ) , switchboard ) ;
result = result . replaceAll ( "!preformatted!!Text!" , preformattedText ) ;
result = result . replaceAll ( "!preformatted!!Text!" , preformattedText ) ;
//}
}
}
//start <pre>
//start <pre>