forked from external/vscode-xml
		
	
							parent
							
								
									c743d032f9
								
							
						
					
					
						commit
						d68dbe8a22
					
				
					 4 changed files with 43 additions and 2 deletions
				
			
		
							
								
								
									
										2
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    "name": "xml",
 | 
					    "name": "xml",
 | 
				
			||||||
    "version": "2.3.2",
 | 
					    "version": "2.4.0",
 | 
				
			||||||
    "lockfileVersion": 1,
 | 
					    "lockfileVersion": 1,
 | 
				
			||||||
    "requires": true,
 | 
					    "requires": true,
 | 
				
			||||||
    "dependencies": {
 | 
					    "dependencies": {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,7 +44,7 @@ describe("V2XmlFormatter", () => {
 | 
				
			||||||
            testFormatter(xmlFormatter, options, "preformatted");
 | 
					            testFormatter(xmlFormatter, options, "preformatted");
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        it ("should preserve line breaks between elements", () => {
 | 
					        it("should preserve line breaks between elements", () => {
 | 
				
			||||||
            testFormatter(xmlFormatter, options, "preserve-breaks");
 | 
					            testFormatter(xmlFormatter, options, "preserve-breaks");
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -95,6 +95,10 @@ describe("V2XmlFormatter", () => {
 | 
				
			||||||
        it("should not remove spaces between the node name and the first attribute within CDATA", () => {
 | 
					        it("should not remove spaces between the node name and the first attribute within CDATA", () => {
 | 
				
			||||||
            testFormatter(xmlFormatter, options, "issue-227");
 | 
					            testFormatter(xmlFormatter, options, "issue-227");
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        it("should handle mixed content as a child of another element", () => {
 | 
				
			||||||
 | 
					            testFormatter(xmlFormatter, options, "issue-257");
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										18
									
								
								src/test/test-data/issue-257.formatted.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								src/test/test-data/issue-257.formatted.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,18 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 | 
				
			||||||
 | 
					    <xsl:output method="xml" encoding="UTF-8" indent="yes" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <xsl:template match="/">
 | 
				
			||||||
 | 
					        <file>
 | 
				
			||||||
 | 
					            <xsl:apply-templates />
 | 
				
			||||||
 | 
					        </file>
 | 
				
			||||||
 | 
					    </xsl:template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <xsl:template match="*">
 | 
				
			||||||
 | 
					        <xsl:message terminate="no">
 | 
				
			||||||
 | 
					            WARNING: Unmatched element: <xsl:value-of select="name()" />
 | 
				
			||||||
 | 
					        </xsl:message>
 | 
				
			||||||
 | 
					        <xsl:apply-templates />
 | 
				
			||||||
 | 
					    </xsl:template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</xsl:stylesheet>
 | 
				
			||||||
							
								
								
									
										19
									
								
								src/test/test-data/issue-257.unformatted.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								src/test/test-data/issue-257.unformatted.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<xsl:stylesheet version="2.0" 
 | 
				
			||||||
 | 
					    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 | 
				
			||||||
 | 
					    <xsl:output method="xml" encoding="UTF-8" indent="yes" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <xsl:template match="/">
 | 
				
			||||||
 | 
					        <file>
 | 
				
			||||||
 | 
					            <xsl:apply-templates />
 | 
				
			||||||
 | 
					        </file>
 | 
				
			||||||
 | 
					    </xsl:template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <xsl:template match="*">
 | 
				
			||||||
 | 
					        <xsl:message terminate="no">
 | 
				
			||||||
 | 
					            WARNING: Unmatched element: <xsl:value-of select="name()"/>
 | 
				
			||||||
 | 
					        </xsl:message>
 | 
				
			||||||
 | 
					        <xsl:apply-templates/>
 | 
				
			||||||
 | 
					    </xsl:template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</xsl:stylesheet>
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue