diff --git a/lib/saxes.js b/lib/saxes.js index a3e7970f..43a8e993 100644 --- a/lib/saxes.js +++ b/lib/saxes.js @@ -1003,14 +1003,9 @@ class SaxesParser { /** @private */ handleTextOutsideRoot() { // This is essentially a specialized version of captureTo which is optimized - // for performing the ]]> check. A previous version of this code, checked - // ``this.text`` for the presence of ]]>. It simplified the code but was - // very costly when character data contained a lot of entities to be parsed. - // - // Since we are using a specialized loop, we also keep track of the presence - // of non-space characters in the text since these are errors when appearing - // outside the document root element. - // + // for a specialized task. We keep track of the presence of non-space + // characters in the text since these are errors when appearing outside the + // document root element. const { chunk, limit, i: start } = this; let nonSpace = false; // eslint-disable-next-line no-labels, no-restricted-syntax