exceptionfactory commented on code in PR #10679:
URL: https://github.com/apache/nifi/pull/10679#discussion_r2644357747
##########
nifi-frontend/src/main/frontend/apps/standard-content-viewer/src/app/pages/standard-content-viewer/feature/standard-content-viewer.component.ts:
##########
@@ -198,7 +198,20 @@ export class StandardContentViewer {
this.error = null;
this.contentLoaded = true;
- this.contentFormGroup.get('value')?.setValue(content);
+ // For XML, clean up formatting for display
+ let processedContent = content;
+ if (this.mimeTypeDisplayName === 'xml') {
+ // Add newline after XML declaration if missing
(<?xml ...?><root> -> <?xml ...?>\n<root>)
+ processedContent =
processedContent.replace(/\?></g, '?>\n<');
Review Comment:
Thanks, looks like this change can be retained along preserving the XML
declaration.
--
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]