mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-21 00:00:13 +02:00
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:
parent
ec4c70d722
commit
36dfb9f686
|
@ -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;
|
||||
|
@ -109,6 +112,19 @@ public class wikiCode {
|
|||
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) {
|
||||
p1 = result.indexOf("====", p0 + 4);
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user