forked from external/vscode-xml
		
	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:
		
						commit
						3d03e38ed6
					
				
					 4 changed files with 24 additions and 1 deletions
				
			
		| 
						 | 
					@ -245,6 +245,11 @@
 | 
				
			||||||
                    "command": "xmlTools.minifyXml",
 | 
					                    "command": "xmlTools.minifyXml",
 | 
				
			||||||
                    "group": "1_modification@100",
 | 
					                    "group": "1_modification@100",
 | 
				
			||||||
                    "when": "editorLangId == 'xml'"
 | 
					                    "when": "editorLangId == 'xml'"
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    "command": "xmlTools.getCurrentXPath",
 | 
				
			||||||
 | 
					                    "group": "z_commands",
 | 
				
			||||||
 | 
					                    "when": "editorLangId == 'xml'"
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            ]
 | 
					            ]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
| 
						 | 
					@ -280,4 +285,4 @@
 | 
				
			||||||
        "xpath": "0.0.27",
 | 
					        "xpath": "0.0.27",
 | 
				
			||||||
        "xqlint": "^0.4.1"
 | 
					        "xqlint": "^0.4.1"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -107,6 +107,10 @@ describe("V2XmlFormatter", () => {
 | 
				
			||||||
        it("should not add trailing whitespace", () => {
 | 
					        it("should not add trailing whitespace", () => {
 | 
				
			||||||
            testFormatter(xmlFormatter, options, "issue-288");
 | 
					            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)", () => {
 | 
					    describe("#minifyXml(xml, options)", () => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										7
									
								
								src/test/test-data/issue-294.formatted.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								src/test/test-data/issue-294.formatted.xml
									
										
									
									
									
										Normal 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>
 | 
				
			||||||
							
								
								
									
										7
									
								
								src/test/test-data/issue-294.unformatted.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								src/test/test-data/issue-294.unformatted.xml
									
										
									
									
									
										Normal 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>
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue