git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2920 wrap description in <html/> if it includes <br/>
[jalview.git]
/
src
/
jalview
/
ws
/
dbsources
/
Uniprot.java
diff --git
a/src/jalview/ws/dbsources/Uniprot.java
b/src/jalview/ws/dbsources/Uniprot.java
index
c311ea9
..
167cd97
100644
(file)
--- a/
src/jalview/ws/dbsources/Uniprot.java
+++ b/
src/jalview/ws/dbsources/Uniprot.java
@@
-309,7
+309,9
@@
public class Uniprot extends DbSourceProxyImpl
/*
* append variant in standard format if present
* e.g. p.Arg59Lys
/*
* append variant in standard format if present
* e.g. p.Arg59Lys
+ * multiple variants are split over lines using <br>
*/
*/
+ boolean asHtml = false;
if (orig != null && !orig.isEmpty() && variants != null
&& !variants.isEmpty())
{
if (orig != null && !orig.isEmpty() && variants != null
&& !variants.isEmpty())
{
@@
-356,7
+358,8
@@
public class Uniprot extends DbSourceProxyImpl
}
if (++p != variants.size())
{
}
if (++p != variants.size())
{
- sb.append("\n");
+ sb.append("<br/> ");
+ asHtml = true;
}
else
{
}
else
{
@@
-369,6
+372,11
@@
public class Uniprot extends DbSourceProxyImpl
{
sb.append(description);
}
{
sb.append(description);
}
+ if (asHtml)
+ {
+ sb.insert(0, "<html>");
+ sb.append("</html>");
+ }
return sb.toString();
}
return sb.toString();
}