microsoft / XmlNotepad

XML Notepad provides a simple intuitive User Interface for browsing and editing XML documents.

Home Page:https://microsoft.github.io/XmlNotepad/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XML Comparison report doesn't show full path of file being compared

SeanKilleen opened this issue · comments

Stumbled across this tool and used it to compare XML files quickly and correctly. Thanks for the time saver!

I noticed that in the HTML output of the comparison report, the file we're comparing to doesn't appear to be listed -- just its directory. Screenshot:

image

I think it's because the XmlDiffBody resource string is defined as:

<data name="XmlDiffBody" xml:space="preserve">
<value>&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td title='{0}'&gt;&lt;b&gt; File in editor : {1}&lt;/b&gt;&lt;/td&gt;
&lt;td title='{2}'&gt;&lt;b&gt; File to compare : {3}&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;</value>
</data>

And when called, the directory is what's passed to it:

resultHtml.WriteLine(string.Format(SR.XmlDiffBody,
System.IO.Path.GetDirectoryName(sourceXmlFile),
sourceXmlFile,
System.IO.Path.GetDirectoryName(changedXmlFile),
changedXmlFile
));

This is just a drive-by issue so I haven't gotten to look into it deeply but figured I'd start by passing it along.

Thanks for the bug report.

File in editor : {1} is correct, this is picking up sourceXmlFile which is a full path.

Maybe this is fixed in a newer version because this is what I'm seeing:

image