Merge pull request #328 from DotJoshJohnson/feature/284-xpath-context-menu

Add "Get Current XPath" Command to Editor Context Menu
This commit is contained in:
Josh Johnson 2020-07-25 22:28:05 -04:00 committed by GitHub
commit 3d03e38ed6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 1 deletions

View file

@ -245,6 +245,11 @@
"command": "xmlTools.minifyXml",
"group": "1_modification@100",
"when": "editorLangId == 'xml'"
},
{
"command": "xmlTools.getCurrentXPath",
"group": "z_commands",
"when": "editorLangId == 'xml'"
}
]
},

View file

@ -107,6 +107,10 @@ describe("V2XmlFormatter", () => {
it("should not add trailing whitespace", () => {
testFormatter(xmlFormatter, options, "issue-288");
});
it("should handle mixed content on the same line as another element", () => {
testFormatter(xmlFormatter, options, "issue-294");
});
});
describe("#minifyXml(xml, options)", () => {

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0">
<div>
ThisCausesBug <img src="test"/>
<img src="test"/>
</div>
</xsl:stylesheet>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0">
<div>
ThisCausesBug <img src="test"/>
<img src="test"/>
</div>
</xsl:stylesheet>