From 1c3b415c355469e91834f2b4cac0ca9f6300cbfc Mon Sep 17 00:00:00 2001 From: low012 Date: Wed, 8 Mar 2006 00:24:49 +0000 Subject: [PATCH] *) nicer anchors (TOC) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1852 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/data/wikiCode.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/de/anomic/data/wikiCode.java b/source/de/anomic/data/wikiCode.java index 637d48c6f..40a4f1097 100644 --- a/source/de/anomic/data/wikiCode.java +++ b/source/de/anomic/data/wikiCode.java @@ -515,7 +515,7 @@ public class wikiCode { //counting double headlines doubles = 0; for(int j=0;j"+element+"
\n"; + directory = directory + "    "+element+"
\n"; } else if (element.startsWith("2")){ if(level==1){ @@ -545,7 +545,7 @@ public class wikiCode { level2++; String temp = element.substring(1); element=level1+"."+level2+" "+temp; - directory = directory + "  "+element+"
\n"; + directory = directory + "  "+element+"
\n"; } else if (element.startsWith("1")) { if (level>1) { @@ -556,7 +556,7 @@ public class wikiCode { level1++; String temp = element.substring(1); element=level1+". "+temp; - directory = directory + ""+element+"
\n"; + directory = directory + ""+element+"
\n"; } anchorext=""; } @@ -594,7 +594,7 @@ public class wikiCode { doubles++; } } - String anchor = replaceHTML(direlem.replaceAll(" ","_")); //replace blanks with underscores + String anchor = direlem.replaceAll(" ","_").replaceAll("[^a-zA-Z0-1_]",""); //replace blanks with underscores and delete everything thats not a regular character, a number or _ //if there are doubles, add underscore and number of doubles plus one if(doubles>0){ anchor = anchor + "_" + (doubles+1);