scholarsmate commented on code in PR #1022:
URL: https://github.com/apache/daffodil-vscode/pull/1022#discussion_r1591612768


##########
debugger/src/main/scala/org.apache.daffodil.tdml/TDML.scala:
##########
@@ -123,6 +123,8 @@ object TDML {
       .relativize(new File(path.toString()).toURI())
       .getPath()
       .toString()
+      .replaceFirst("^\\s++", "")
+      .replaceFirst("\\s++$", "")

Review Comment:
   Just use `.trim()` here instead.  It will remove leading and trailing 
whitespace characters from strings.



##########
debugger/src/main/scala/org.apache.daffodil.tdml/TDML.scala:
##########
@@ -278,6 +280,8 @@ object TDML {
                 .asInstanceOf[JAXBElement[DocumentPartType]]
                 .getValue()
                 .getValue()
+                .replaceFirst("^\\s++", "")
+                .replaceFirst("\\s++$", "")

Review Comment:
   Use `.trim()`.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to