From 777a5c9c98447c57baff529c409c3225e81a82b5 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Thu, 4 Nov 2010 14:22:24 +0000 Subject: Added spaces at end of lines, fixed for multi tech definitions --- bladictionary.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'bladictionary.java') diff --git a/bladictionary.java b/bladictionary.java index 8f887b2..0691e7b 100644 --- a/bladictionary.java +++ b/bladictionary.java @@ -54,7 +54,7 @@ public class bladictionary { { wn = true; } - else if (line.equals("foldoc")) + else if (line.equals("foldoc")&&fcount<1) { //Read tech definitions too foldoc = true; @@ -110,7 +110,7 @@ public class bladictionary { { parts = line.split("\\["); - result = result + parts[0]; + result = result + parts[0] + " "; } else { @@ -132,12 +132,21 @@ public class bladictionary { if(parts.length>1) { + //Special case - if it's more than 1 definition + //Keep reading the first one + if(parts[0].equals("1")) + { + result = result + parts[1].substring(1,parts[1].length())+" "; + } + else + { definition2 = false; result = result + parts[0]; + } } else { - result = result + line; + result = result + line + " "; } } @@ -149,6 +158,7 @@ public class bladictionary { if(!result.equals("")) { + result = result.substring(0,result.length()-1)+";"; System.out.println(result); System.exit(0); } -- cgit v1.2.3