parent
							
								
									88ac5d9a08
								
							
						
					
					
						commit
						b55c314aa4
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
					@ -62,7 +62,7 @@ export class XmlFormatter {
 | 
				
			||||||
            // <elm></elm>
 | 
					            // <elm></elm>
 | 
				
			||||||
            else if (/^<\w/.test(parts[i - 1]) && /^<\/\w/.test(parts[i])
 | 
					            else if (/^<\w/.test(parts[i - 1]) && /^<\/\w/.test(parts[i])
 | 
				
			||||||
                && /^<[\w:\-\.\,]+/.exec(parts[i - 1])[0] == /^<\/[\w:\-\.\,]+/.exec(parts[i])[0].replace('/', '')) {
 | 
					                && /^<[\w:\-\.\,]+/.exec(parts[i - 1])[0] == /^<\/[\w:\-\.\,]+/.exec(parts[i])[0].replace('/', '')) {
 | 
				
			||||||
                    
 | 
					
 | 
				
			||||||
                output += parts[i];
 | 
					                output += parts[i];
 | 
				
			||||||
                if (!inComment) level--;
 | 
					                if (!inComment) level--;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -157,7 +157,11 @@ export class XmlFormatter {
 | 
				
			||||||
                inCdata = true;
 | 
					                inCdata = true;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            else if (char == ']' && (xml.substr(i, 3) == ']]>' || xml.substr(i, 3) == '-->')) {
 | 
					            else if (char == ']' && (xml.substr(i, 3) == ']]>')) {
 | 
				
			||||||
 | 
					                inCdata = false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            else if (char == '-' && (xml.substr(i, 3) == '-->')) {
 | 
				
			||||||
                inCdata = false;
 | 
					                inCdata = false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue