[Biojava-dev] [Bug 2223] newline characters in RichSequence description

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Mar 2 10:12:05 UTC 2007


http://bugzilla.open-bio.org/show_bug.cgi?id=2223


holland at ebi.ac.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Comment #1 from holland at ebi.ac.uk  2007-03-02 05:12 EST -------
This newline stuff is annoying, admittedly, but it is deliberate. There are a
number of formats out there which rely on newlines being preserved within
comment or description text, such as the Genbank-like format produced by
Vectorbase. Also, some comments or descriptions are meaningless if the newlines
are not preserved (consider a description or comment block that makes an
ordered list of points, one per line, but those points do not take up the whole
line - if the newlines were ignored and the block reformatted on output then
the points would run into each other). 

I originally had this code to drop the newlines, but there were too many
problems due to the above situations, and so I made it preserve them. Granted
this makes transfers to other formats a little messy, sometimes introducing
newlines where they are not necessary, but it preserves things much better. 

If you need the newlines taken out, a simple search-and-replace on the text
would do it:  mydesc = mydesc.replaceAll("\n","");

If you then need to update the record before formatting it you can update (or
replace) the comment object involved.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the biojava-dev mailing list