stricklandrbls commented on code in PR #927:
URL: https://github.com/apache/daffodil-vscode/pull/927#discussion_r1443342883


##########
src/utils.ts:
##########
@@ -79,6 +80,30 @@ export async function onDebugStartDisplay(viewsToCheck: 
string[]) {
   })
 }
 
+function checkInfosetFileExtension(
+  infosetOutput: InfosetOutput,
+  infosetFormat: string
+) {
+  // If the infoset file path doesn't end with the infoset output format, 
update to end with infoset output format.
+  if (!infosetOutput.path.endsWith(`.${infosetFormat}`)) {
+    let fileExtensionSearchResult = new RegExp('(\\.).*$')
+      .exec(infosetOutput!.path)
+      ?.filter((fileExt) => fileExt !== '.')[0]
+
+    /**
+     * If search result is not undefined replace the file extension with the 
correct extension.
+     * Else append proper file extension to the end of the output path.
+     */
+    infosetOutput.path =

Review Comment:
   _Same as the above_ 
[comment.](https://github.com/apache/daffodil-vscode/pull/927/files#r1443342302)



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