[HepData-svn] r1890 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Sep 11 14:58:48 BST 2015


Author: watt
Date: Fri Sep 11 14:58:48 2015
New Revision: 1890

Log:
Add full stops to end of comments and don't convert > or < symbols to HTML in YAML formatter

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YamlFormatter.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YamlFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YamlFormatter.java	Mon Sep  7 15:17:27 2015	(r1889)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YamlFormatter.java	Fri Sep 11 14:58:48 2015	(r1890)
@@ -85,10 +85,10 @@
             boolean first=true;
             for (String comment : p.getComments()){
                 if(first){ 
-                    s.append(s4+comment.replaceAll("\n","\n    "));
+                    s.append(s4+comment.replaceAll("\n","\n    ")+".");
                     first=false;
                 } else {
-                    s.append(s4+comment.replaceAll("\n","\n    "));
+                    s.append(s4+comment.replaceAll("\n","\n    ")+".");
                 }
                 s.append("\n");
             }
@@ -197,10 +197,10 @@
             if(!ct.startsWith("Location:")) {
                 s.append("description: |\n");
                 if(first){
-                    s.append(s4+ct.replaceFirst("VERBATIM","").replaceAll(">",">").replaceAll("<","<").replaceAll("\n","\n    "));
+                    s.append(s4+ct.replaceFirst("VERBATIM","").replaceAll("\n","\n    ")+".");
                     first=false;
                 } else {
-                    s.append(s4+ct.replaceFirst("VERBATIM","").replaceAll(">",">").replaceAll("<","<").replaceAll("\n","\n    "));
+                    s.append(s4+ct.replaceFirst("VERBATIM","").replaceAll("\n","\n    ")+".");
                 }
                 s.append("\n");
             }


More information about the HepData-svn mailing list