xml-formatter
Advanced tools
Comparing version 3.5.0 to 3.6.0
@@ -441,3 +441,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.xmlFormatter = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
child.content = child.content.trim(); | ||
} else if (index === 0 || index === nodeChildren.length - 1) { | ||
} else if ((index === 0 || index === nodeChildren.length - 1) && !preserveSpace) { | ||
if (child.content.trim().length === 0) { | ||
@@ -444,0 +444,0 @@ // If the text node is at the start or end and is empty, it should be ignored when formatting |
@@ -441,3 +441,3 @@ require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
child.content = child.content.trim(); | ||
} else if (index === 0 || index === nodeChildren.length - 1) { | ||
} else if ((index === 0 || index === nodeChildren.length - 1) && !preserveSpace) { | ||
if (child.content.trim().length === 0) { | ||
@@ -444,0 +444,0 @@ // If the text node is at the start or end and is empty, it should be ignored when formatting |
@@ -98,3 +98,3 @@ "use strict"; | ||
} | ||
else if (index === 0 || index === nodeChildren.length - 1) { | ||
else if ((index === 0 || index === nodeChildren.length - 1) && !preserveSpace) { | ||
if (child.content.trim().length === 0) { | ||
@@ -101,0 +101,0 @@ // If the text node is at the start or end and is empty, it should be ignored when formatting |
@@ -93,3 +93,3 @@ import xmlParser from 'xml-parser-xo'; | ||
} | ||
else if (index === 0 || index === nodeChildren.length - 1) { | ||
else if ((index === 0 || index === nodeChildren.length - 1) && !preserveSpace) { | ||
if (child.content.trim().length === 0) { | ||
@@ -96,0 +96,0 @@ // If the text node is at the start or end and is empty, it should be ignored when formatting |
{ | ||
"name": "xml-formatter", | ||
"version": "3.5.0", | ||
"version": "3.6.0", | ||
"repository": "github:chrisbottin/xml-formatter", | ||
@@ -5,0 +5,0 @@ "bugs": { |
@@ -173,3 +173,3 @@ import xmlParser, { | ||
child.content = child.content.trim(); | ||
} else if (index === 0 || index === nodeChildren.length - 1) { | ||
} else if ((index === 0 || index === nodeChildren.length - 1) && !preserveSpace) { | ||
if (child.content.trim().length === 0) { | ||
@@ -176,0 +176,0 @@ // If the text node is at the start or end and is empty, it should be ignored when formatting |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81534