From c04483d84d3316dfeb9066d03e0eccf95a71b02b Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 14 Jun 2013 16:18:23 +0100 Subject: [PATCH] JAL-1316 compact '' to ' --- src/jalview/io/NewickFile.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jalview/io/NewickFile.java b/src/jalview/io/NewickFile.java index d653811..9ed1491 100755 --- a/src/jalview/io/NewickFile.java +++ b/src/jalview/io/NewickFile.java @@ -357,6 +357,10 @@ public class NewickFile extends FileParse int nl = qnodename.stringMatched().length(); nodename = new String(qnodename.stringMatched().substring(1, nl - 1)); + // unpack any escaped colons + com.stevesoft.pat.Regex xpandquotes = com.stevesoft.pat.Regex.perlCode("s/''/'/"); + String widernodename = xpandquotes.replaceAll(nodename); + nodename=widernodename; // jump to after end of quoted nodename nextcp = fcp + nl + 1; parsednodename=true; -- 1.7.10.2