From: Jim Procter Date: Fri, 14 Jun 2013 15:18:23 +0000 (+0100) Subject: JAL-1316 compact '' to ' X-Git-Tag: Jalview_2_9~241^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c04483d84d3316dfeb9066d03e0eccf95a71b02b;p=jalview.git JAL-1316 compact '' to ' --- 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;