function textContent(text) {
          text[that._html ? "html" : "text"](function (t) {
            return trimRight(t).replace(/&([^\;&]*)/g, function (str, a) {
              return a === "amp" ? str : "&amp;".concat(a);
            }) // replaces all non-HTML ampersands with escaped entity
            .replace(/<([^A-z^/]+)/g, function (str, a) {
              return "&lt;".concat(a);
            }).replace(/<$/g, "&lt;") // replaces all non-HTML left angle brackets with escaped entity
            .replace(/(<[^>^\/]+>)([^<^>]+)$/g, function (str, a, b) {
              return "".concat(a).concat(b).concat(a.replace("<", "</"));
            }) // ands end tag to lines before mid-HTML break
            .replace(/^([^<^>]+)(<\/[^>]+>)/g, function (str, a, b) {
              return "".concat(b.replace("</", "<")).concat(a).concat(b);
            }) // ands start tag to lines after mid-HTML break
            .replace(/<([A-z]+)[^>]*>([^<^>]+)<\/[^>]+>/g, function (str, a, b) {
              var tag = that._html[a] ? "<tspan style=\"".concat(that._html[a], "\">") : "";
              return "".concat(tag.length ? tag : "").concat(b).concat(tag.length ? "</tspan>" : "");
            });
          });
        }
/**
            Sets the inner text content of each <text> element.
            @private
        */
Sets the inner text content of each  element.
Sets the inner text content of each element .
function textContent(text) {
          text[that._html ? "html" : "text"](function (t) {
            return trimRight(t).replace(/&([^\;&]*)/g, function (str, a) {
              return a === "amp" ? str : "&amp;".concat(a);
            }) 
            .replace(/<([^A-z^/]+)/g, function (str, a) {
              return "&lt;".concat(a);
            }).replace(/<$/g, "&lt;") 
            .replace(/(<[^>^\/]+>)([^<^>]+)$/g, function (str, a, b) {
              return "".concat(a).concat(b).concat(a.replace("<", "</"));
            }) 
            .replace(/^([^<^>]+)(<\/[^>]+>)/g, function (str, a, b) {
              return "".concat(b.replace("</", "<")).concat(a).concat(b);
            }) 
            .replace(/<([A-z]+)[^>]*>([^<^>]+)<\/[^>]+>/g, function (str, a, b) {
              var tag = that._html[a] ? "<tspan style=\"".concat(that._html[a], "\">") : "";
              return "".concat(tag.length ? tag : "").concat(b).concat(tag.length ? "</tspan>" : "");
            });
          });
        }
function textContent ( text ) { text [ that . _html ? "html" : "text" ] ( function ( t ) { return trimRight ( t ) . replace ( / &([^\;&]*) / g , function ( str , a ) { return a === "amp" ? str : "&amp;" . concat ( a ) ; } ) . replace ( / <([^A-z^/]+) / g , function ( str , a ) { return "&lt;" . concat ( a ) ; } ) . replace ( / <$ / g , "&lt;" ) . replace ( / (<[^>^\/]+>)([^<^>]+)$ / g , function ( str , a , b ) { return "" . concat ( a ) . concat ( b ) . concat ( a . replace ( "<" , "</" ) ) ; } ) . replace ( / ^([^<^>]+)(<\/[^>]+>) / g , function ( str , a , b ) { return "" . concat ( b . replace ( "</" , "<" ) ) . concat ( a ) . concat ( b ) ; } ) . replace ( / <([A-z]+)[^>]*>([^<^>]+)<\/[^>]+> / g , function ( str , a , b ) { var tag = that . _html [ a ] ? "<tspan style=\"" . concat ( that . _html [ a ] , "\">" ) : "" ; return "" . concat ( tag . length ? tag : "" ) . concat ( b ) . concat ( tag . length ? "</tspan>" : "" ) ; } ) ; } ) ; }
Sets the inner text content of each <text> element.
Sets the inner text content of each <text > element .
// replaces all non-HTML ampersands with escaped entity // replaces all non-HTML left angle brackets with escaped entity // ands end tag to lines before mid-HTML break // ands start tag to lines after mid-HTML break