tuxji commented on a change in pull request #560:
URL: https://github.com/apache/daffodil/pull/560#discussion_r639710127



##########
File path: 
daffodil-tdml-processor/src/main/scala/org/apache/daffodil/tdml/TDMLInfosetInputter.scala
##########
@@ -68,22 +67,20 @@ class TDMLInfosetInputter(val scalaInputter: 
ScalaXMLInfosetInputter, others: Se
   override def getSimpleText(primType: NodeInfo.Kind): String = {
     val res = scalaInputter.getSimpleText(primType)
     val resIsEmpty = res == null || res == ""
-    val othersmatch = others.forall { i =>
-      val st = i.getSimpleText(primType)
+    val otherStrings = others.map { i =>
+      val firstVersion = i.getSimpleText(primType)
+      val finalVersion = i match {
+        case _ if (firstVersion eq null) => ""
+        case jsonii: JsonInfosetInputter => 
firstVersion.replaceAll("(\r\n|\r)", "\n").
+          replaceAll("\r", "\n")
+        case _ => firstVersion
+      }
+      finalVersion
+    }
+    val othersmatch = otherStrings.forall { case st: String =>
       val stIsEmpty = st == null || res == ""

Review comment:
       What was the resolution of the comments on this line of code?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to