diff options
author | Joe Robinson <joe@lc8n.com> | 2010-11-04 14:22:24 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2010-11-04 14:22:24 +0000 |
commit | 777a5c9c98447c57baff529c409c3225e81a82b5 (patch) | |
tree | f5d97c0c54b4afc2972f42144d251c059e2637cb | |
parent | c50d1cde5c9a18ed7579cf9f5467e668b63371f1 (diff) |
Added spaces at end of lines, fixed for multi tech definitions
-rw-r--r-- | bladictionary.java | 16 |
1 files changed, 13 insertions, 3 deletions
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("<Id>foldoc</Id>")) + else if (line.equals("<Id>foldoc</Id>")&&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); } |