|
[HepData-svn] r1758 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/componentsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Mar 12 10:25:15 GMT 2014
Author: whalley Date: Wed Mar 12 10:25:15 2014 New Revision: 1758 Log: changing newline character from # to \\n Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayDatasetComments.java trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayPaperComments.java Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayDatasetComments.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayDatasetComments.java Fri Feb 28 16:51:31 2014 (r1757) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayDatasetComments.java Wed Mar 12 10:25:15 2014 (r1758) @@ -41,14 +41,16 @@ // System.out.println(bs + " " + ls); while (ls>0){ int iend = ls; - int ihash = bs.indexOf("#"); +// int ihash = bs.indexOf("#"); + int ihash = bs.indexOf("\\n"); // System.out.println("ihash "+ihash+" iend " + ls); if(ihash>=0) { iend = ihash; } writer.element("br"); writer.end(); writer.write(bs.substring(0,iend)); if(iend<ls){ - bs=bs.substring(ihash+1); +// bs=bs.substring(ihash+1); + bs=bs.substring(ihash+2); ls=bs.length(); } else { ls=0; Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayPaperComments.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayPaperComments.java Fri Feb 28 16:51:31 2014 (r1757) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayPaperComments.java Wed Mar 12 10:25:15 2014 (r1758) @@ -69,14 +69,16 @@ // System.out.println(bs + " " + ls); while (ls>0){ int iend = ls; - int ihash = bs.indexOf("#"); + // int ihash = bs.indexOf("#"); + int ihash = bs.indexOf("\\n"); // System.out.println("ihash "+ihash+" iend " + ls); if(ihash>=0) { iend = ihash; } writer.element("br"); writer.end(); writer.write(bs.substring(0,iend)); if(iend<ls){ - bs=bs.substring(ihash+1); + // bs=bs.substring(ihash+1); + bs=bs.substring(ihash+2); ls=bs.length(); } else { ls=0;
More information about the HepData-svn mailing list |