From ed54464d6d1c4e28bcecd20651d24911e5934e29 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Mon, 1 Nov 2010 00:05:42 +0000 Subject: Escape quotation marks --- bladictionary.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/bladictionary.java b/bladictionary.java index 403c821..dadd88b 100644 --- a/bladictionary.java +++ b/bladictionary.java @@ -73,8 +73,8 @@ public class bladictionary { else { - if (line.substring(0,1).equals("n") || line.substring(0,1).equals("v") - || line.substring(0,3).equals("adj") || line.substring(0,3).equals("adv")) + if (line.substring(0,2).equals("n ") || line.substring(0,2).equals("v ") + || line.substring(0,4).equals("adj ") || line.substring(0,4).equals("adv ")) { definition2 = true; //System.out.println(line); @@ -87,14 +87,7 @@ public class bladictionary { { parts = line.split("\\["); - if (result.equals("")) - { - result = parts[0]; - } - else - { - result = result + "; "+ parts[0]; - } + result = result + parts[0] + "; "; } else { @@ -106,7 +99,7 @@ public class bladictionary { } } } - + result = result.replaceAll("\"", "\\\\\""); if(!result.equals("")) { System.out.println(result); -- cgit v1.2.3