implemented citings (blockquote) and an early version of definitions (not much of a list yet)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@557 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
low012 2005-08-19 01:38:14 +00:00
parent ec4c70d722
commit 36dfb9f686

View File

@ -41,6 +41,9 @@
// the intact and unchanged copyright notice.
// Contributions and changes to the program code must be marked as such.
// Contains contributions from Alexander Schier [AS]
// and Marc Nause [MN]
package de.anomic.data;
import java.io.BufferedReader;
@ -108,6 +111,19 @@ public class wikiCode {
// format lines
if (result.startsWith(" ")) result = "<tt>" + result + "</tt>";
if (result.startsWith("----")) result = "<hr>";
// citings contributed by [MN]
if(result.startsWith(":")){
String head = "";
String tail = "";
while(result.startsWith(":")){
head = head + "<blockquote>";
tail = tail + "</blockquote>";
result = result.substring(1);
}
result = head + result + tail +"\n";
}
// end contrib [MN]
// format headers
if ((p0 = result.indexOf("====")) >= 0) {
@ -148,6 +164,14 @@ public class wikiCode {
result.substring(p1 + 2);
}
//* definition lists contributed by [MN] (primitive prototype, needs work)
if(result.startsWith(";")){
if((p0 = result.indexOf(":")) > 0){
result = "<dl>\n<dt>" + result.substring(1,p0) + "</dt>\n<dd>" + result.substring(p0+1) +"</dd><dl>\n";
}
}
// end contrib [MN]
//* unorderd Lists contributed by [AS]
//** Sublist
if(result.startsWith(ListLevel + "*")){ //more stars