[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> autop.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["autop"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 233);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 22:
  91  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  92  
  93  "use strict";
  94  
  95  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
  96  var arrayWithHoles = __webpack_require__(35);
  97  
  98  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
  99  function _iterableToArrayLimit(arr, i) {
 100    if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
 101      return;
 102    }
 103  
 104    var _arr = [];
 105    var _n = true;
 106    var _d = false;
 107    var _e = undefined;
 108  
 109    try {
 110      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 111        _arr.push(_s.value);
 112  
 113        if (i && _arr.length === i) break;
 114      }
 115    } catch (err) {
 116      _d = true;
 117      _e = err;
 118    } finally {
 119      try {
 120        if (!_n && _i["return"] != null) _i["return"]();
 121      } finally {
 122        if (_d) throw _e;
 123      }
 124    }
 125  
 126    return _arr;
 127  }
 128  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 129  var nonIterableRest = __webpack_require__(36);
 130  
 131  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 132  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _slicedToArray; });
 133  
 134  
 135  
 136  function _slicedToArray(arr, i) {
 137    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(nonIterableRest["a" /* default */])();
 138  }
 139  
 140  /***/ }),
 141  
 142  /***/ 233:
 143  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 144  
 145  "use strict";
 146  __webpack_require__.r(__webpack_exports__);
 147  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autop", function() { return autop; });
 148  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removep", function() { return removep; });
 149  /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22);
 150  
 151  
 152  /**
 153   * The regular expression for an HTML element.
 154   *
 155   * @type {string}
 156   */
 157  var htmlSplitRegex = function () {
 158    /* eslint-disable no-multi-spaces */
 159    var comments = '!' + // Start of comment, after the <.
 160    '(?:' + // Unroll the loop: Consume everything until --> is found.
 161    '-(?!->)' + // Dash not followed by end of comment.
 162    '[^\\-]*' + // Consume non-dashes.
 163    ')*' + // Loop possessively.
 164    '(?:-->)?'; // End of comment. If not found, match all input.
 165  
 166    var cdata = '!\\[CDATA\\[' + // Start of comment, after the <.
 167    '[^\\]]*' + // Consume non-].
 168    '(?:' + // Unroll the loop: Consume everything until ]]> is found.
 169    '](?!]>)' + // One ] not followed by end of comment.
 170    '[^\\]]*' + // Consume non-].
 171    ')*?' + // Loop possessively.
 172    '(?:]]>)?'; // End of comment. If not found, match all input.
 173  
 174    var escaped = '(?=' + // Is the element escaped?
 175    '!--' + '|' + '!\\[CDATA\\[' + ')' + '((?=!-)' + // If yes, which type?
 176    comments + '|' + cdata + ')';
 177    var regex = '(' + // Capture the entire match.
 178    '<' + // Find start of element.
 179    '(' + // Conditional expression follows.
 180    escaped + // Find end of escaped element.
 181    '|' + // ... else ...
 182    '[^>]*>?' + // Find end of normal element.
 183    ')' + ')';
 184    return new RegExp(regex);
 185    /* eslint-enable no-multi-spaces */
 186  }();
 187  /**
 188   * Separate HTML elements and comments from the text.
 189   *
 190   * @param  {string} input The text which has to be formatted.
 191   * @return {Array}        The formatted text.
 192   */
 193  
 194  
 195  function htmlSplit(input) {
 196    var parts = [];
 197    var workingInput = input;
 198    var match;
 199  
 200    while (match = workingInput.match(htmlSplitRegex)) {
 201      parts.push(workingInput.slice(0, match.index));
 202      parts.push(match[0]);
 203      workingInput = workingInput.slice(match.index + match[0].length);
 204    }
 205  
 206    if (workingInput.length) {
 207      parts.push(workingInput);
 208    }
 209  
 210    return parts;
 211  }
 212  /**
 213   * Replace characters or phrases within HTML elements only.
 214   *
 215   * @param  {string} haystack     The text which has to be formatted.
 216   * @param  {Object} replacePairs In the form {from: 'to', ...}.
 217   * @return {string}              The formatted text.
 218   */
 219  
 220  
 221  function replaceInHtmlTags(haystack, replacePairs) {
 222    // Find all elements.
 223    var textArr = htmlSplit(haystack);
 224    var changed = false; // Extract all needles.
 225  
 226    var needles = Object.keys(replacePairs); // Loop through delimiters (elements) only.
 227  
 228    for (var i = 1; i < textArr.length; i += 2) {
 229      for (var j = 0; j < needles.length; j++) {
 230        var needle = needles[j];
 231  
 232        if (-1 !== textArr[i].indexOf(needle)) {
 233          textArr[i] = textArr[i].replace(new RegExp(needle, 'g'), replacePairs[needle]);
 234          changed = true; // After one strtr() break out of the foreach loop and look at next element.
 235  
 236          break;
 237        }
 238      }
 239    }
 240  
 241    if (changed) {
 242      haystack = textArr.join('');
 243    }
 244  
 245    return haystack;
 246  }
 247  /**
 248   * Replaces double line-breaks with paragraph elements.
 249   *
 250   * A group of regex replaces used to identify text formatted with newlines and
 251   * replace double line-breaks with HTML paragraph tags. The remaining line-
 252   * breaks after conversion become `<br />` tags, unless br is set to 'false'.
 253   *
 254   * @param  {string}    text The text which has to be formatted.
 255   * @param  {boolean}   br   Optional. If set, will convert all remaining line-
 256   *                          breaks after paragraphing. Default true.
 257   *
 258   * @example
 259   *```js
 260   * import { autop } from '@wordpress/autop';
 261   * autop( 'my text' ); // "<p>my text</p>"
 262   * ```
 263   *
 264   * @return {string}         Text which has been converted into paragraph tags.
 265   */
 266  
 267  
 268  function autop(text) {
 269    var br = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
 270    var preTags = [];
 271  
 272    if (text.trim() === '') {
 273      return '';
 274    } // Just to make things a little easier, pad the end.
 275  
 276  
 277    text = text + '\n';
 278    /*
 279     * Pre tags shouldn't be touched by autop.
 280     * Replace pre tags with placeholders and bring them back after autop.
 281     */
 282  
 283    if (text.indexOf('<pre') !== -1) {
 284      var textParts = text.split('</pre>');
 285      var lastText = textParts.pop();
 286      text = '';
 287  
 288      for (var i = 0; i < textParts.length; i++) {
 289        var textPart = textParts[i];
 290        var start = textPart.indexOf('<pre'); // Malformed html?
 291  
 292        if (start === -1) {
 293          text += textPart;
 294          continue;
 295        }
 296  
 297        var name = '<pre wp-pre-tag-' + i + '></pre>';
 298        preTags.push([name, textPart.substr(start) + '</pre>']);
 299        text += textPart.substr(0, start) + name;
 300      }
 301  
 302      text += lastText;
 303    } // Change multiple <br>s into two line breaks, which will turn into paragraphs.
 304  
 305  
 306    text = text.replace(/<br\s*\/?>\s*<br\s*\/?>/g, '\n\n');
 307    var allBlocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; // Add a double line break above block-level opening tags.
 308  
 309    text = text.replace(new RegExp('(<' + allBlocks + '[\\s\/>])', 'g'), '\n\n$1'); // Add a double line break below block-level closing tags.
 310  
 311    text = text.replace(new RegExp('(<\/' + allBlocks + '>)', 'g'), '$1\n\n'); // Standardize newline characters to "\n".
 312  
 313    text = text.replace(/\r\n|\r/g, '\n'); // Find newlines in all elements and add placeholders.
 314  
 315    text = replaceInHtmlTags(text, {
 316      '\n': ' <!-- wpnl --> '
 317    }); // Collapse line breaks before and after <option> elements so they don't get autop'd.
 318  
 319    if (text.indexOf('<option') !== -1) {
 320      text = text.replace(/\s*<option/g, '<option');
 321      text = text.replace(/<\/option>\s*/g, '</option>');
 322    }
 323    /*
 324     * Collapse line breaks inside <object> elements, before <param> and <embed> elements
 325     * so they don't get autop'd.
 326     */
 327  
 328  
 329    if (text.indexOf('</object>') !== -1) {
 330      text = text.replace(/(<object[^>]*>)\s*/g, '$1');
 331      text = text.replace(/\s*<\/object>/g, '</object>');
 332      text = text.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g, '$1');
 333    }
 334    /*
 335     * Collapse line breaks inside <audio> and <video> elements,
 336     * before and after <source> and <track> elements.
 337     */
 338  
 339  
 340    if (text.indexOf('<source') !== -1 || text.indexOf('<track') !== -1) {
 341      text = text.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g, '$1');
 342      text = text.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g, '$1');
 343      text = text.replace(/\s*(<(?:source|track)[^>]*>)\s*/g, '$1');
 344    } // Collapse line breaks before and after <figcaption> elements.
 345  
 346  
 347    if (text.indexOf('<figcaption') !== -1) {
 348      text = text.replace(/\s*(<figcaption[^>]*>)/, '$1');
 349      text = text.replace(/<\/figcaption>\s*/, '</figcaption>');
 350    } // Remove more than two contiguous line breaks.
 351  
 352  
 353    text = text.replace(/\n\n+/g, '\n\n'); // Split up the contents into an array of strings, separated by double line breaks.
 354  
 355    var texts = text.split(/\n\s*\n/).filter(Boolean); // Reset text prior to rebuilding.
 356  
 357    text = ''; // Rebuild the content as a string, wrapping every bit with a <p>.
 358  
 359    texts.forEach(function (textPiece) {
 360      text += '<p>' + textPiece.replace(/^\n*|\n*$/g, '') + '</p>\n';
 361    }); // Under certain strange conditions it could create a P of entirely whitespace.
 362  
 363    text = text.replace(/<p>\s*<\/p>/g, ''); // Add a closing <p> inside <div>, <address>, or <form> tag if missing.
 364  
 365    text = text.replace(/<p>([^<]+)<\/(div|address|form)>/g, '<p>$1</p></$2>'); // If an opening or closing block element tag is wrapped in a <p>, unwrap it.
 366  
 367    text = text.replace(new RegExp('<p>\\s*(<\/?' + allBlocks + '[^>]*>)\\s*<\/p>', 'g'), '$1'); // In some cases <li> may get wrapped in <p>, fix them.
 368  
 369    text = text.replace(/<p>(<li.+?)<\/p>/g, '$1'); // If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.
 370  
 371    text = text.replace(/<p><blockquote([^>]*)>/gi, '<blockquote$1><p>');
 372    text = text.replace(/<\/blockquote><\/p>/g, '</p></blockquote>'); // If an opening or closing block element tag is preceded by an opening <p> tag, remove it.
 373  
 374    text = text.replace(new RegExp('<p>\\s*(<\/?' + allBlocks + '[^>]*>)', 'g'), '$1'); // If an opening or closing block element tag is followed by a closing <p> tag, remove it.
 375  
 376    text = text.replace(new RegExp('(<\/?' + allBlocks + '[^>]*>)\\s*<\/p>', 'g'), '$1'); // Optionally insert line breaks.
 377  
 378    if (br) {
 379      // Replace newlines that shouldn't be touched with a placeholder.
 380      text = text.replace(/<(script|style).*?<\/\\1>/g, function (match) {
 381        return match[0].replace(/\n/g, '<WPPreserveNewline />');
 382      }); // Normalize <br>
 383  
 384      text = text.replace(/<br>|<br\/>/g, '<br />'); // Replace any new line characters that aren't preceded by a <br /> with a <br />.
 385  
 386      text = text.replace(/(<br \/>)?\s*\n/g, function (a, b) {
 387        return b ? a : '<br />\n';
 388      }); // Replace newline placeholders with newlines.
 389  
 390      text = text.replace(/<WPPreserveNewline \/>/g, '\n');
 391    } // If a <br /> tag is after an opening or closing block tag, remove it.
 392  
 393  
 394    text = text.replace(new RegExp('(<\/?' + allBlocks + '[^>]*>)\\s*<br \/>', 'g'), '$1'); // If a <br /> tag is before a subset of opening or closing block tags, remove it.
 395  
 396    text = text.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g, '$1');
 397    text = text.replace(/\n<\/p>$/g, '</p>'); // Replace placeholder <pre> tags with their original content.
 398  
 399    preTags.forEach(function (preTag) {
 400      var _preTag = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(preTag, 2),
 401          name = _preTag[0],
 402          original = _preTag[1];
 403  
 404      text = text.replace(name, original);
 405    }); // Restore newlines in all elements.
 406  
 407    if (-1 !== text.indexOf('<!-- wpnl -->')) {
 408      text = text.replace(/\s?<!-- wpnl -->\s?/g, '\n');
 409    }
 410  
 411    return text;
 412  }
 413  /**
 414   * Replaces `<p>` tags with two line breaks. "Opposite" of autop().
 415   *
 416   * Replaces `<p>` tags with two line breaks except where the `<p>` has attributes.
 417   * Unifies whitespace. Indents `<li>`, `<dt>` and `<dd>` for better readability.
 418   *
 419   * @param  {string} html The content from the editor.
 420   *
 421   * @example
 422   * ```js
 423   * import { removep } from '@wordpress/autop';
 424   * removep( '<p>my text</p>' ); // "my text"
 425   * ```
 426   *
 427   * @return {string}      The content with stripped paragraph tags.
 428   */
 429  
 430  function removep(html) {
 431    var blocklist = 'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure';
 432    var blocklist1 = blocklist + '|div|p';
 433    var blocklist2 = blocklist + '|pre';
 434    var preserve = [];
 435    var preserveLinebreaks = false;
 436    var preserveBr = false;
 437  
 438    if (!html) {
 439      return '';
 440    } // Protect script and style tags.
 441  
 442  
 443    if (html.indexOf('<script') !== -1 || html.indexOf('<style') !== -1) {
 444      html = html.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g, function (match) {
 445        preserve.push(match);
 446        return '<wp-preserve>';
 447      });
 448    } // Protect pre tags.
 449  
 450  
 451    if (html.indexOf('<pre') !== -1) {
 452      preserveLinebreaks = true;
 453      html = html.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g, function (a) {
 454        a = a.replace(/<br ?\/?>(\r\n|\n)?/g, '<wp-line-break>');
 455        a = a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g, '<wp-line-break>');
 456        return a.replace(/\r?\n/g, '<wp-line-break>');
 457      });
 458    } // Remove line breaks but keep <br> tags inside image captions.
 459  
 460  
 461    if (html.indexOf('[caption') !== -1) {
 462      preserveBr = true;
 463      html = html.replace(/\[caption[\s\S]+?\[\/caption\]/g, function (a) {
 464        return a.replace(/<br([^>]*)>/g, '<wp-temp-br$1>').replace(/[\r\n\t]+/, '');
 465      });
 466    } // Normalize white space characters before and after block tags.
 467  
 468  
 469    html = html.replace(new RegExp('\\s*</(' + blocklist1 + ')>\\s*', 'g'), '</$1>\n');
 470    html = html.replace(new RegExp('\\s*<((?:' + blocklist1 + ')(?: [^>]*)?)>', 'g'), '\n<$1>'); // Mark </p> if it has any attributes.
 471  
 472    html = html.replace(/(<p [^>]+>[\s\S]*?)<\/p>/g, '$1</p#>'); // Preserve the first <p> inside a <div>.
 473  
 474    html = html.replace(/<div( [^>]*)?>\s*<p>/gi, '<div$1>\n\n'); // Remove paragraph tags.
 475  
 476    html = html.replace(/\s*<p>/gi, '');
 477    html = html.replace(/\s*<\/p>\s*/gi, '\n\n'); // Normalize white space chars and remove multiple line breaks.
 478  
 479    html = html.replace(/\n[\s\u00a0]+\n/g, '\n\n'); // Replace <br> tags with line breaks.
 480  
 481    html = html.replace(/(\s*)<br ?\/?>\s*/gi, function (match, space) {
 482      if (space && space.indexOf('\n') !== -1) {
 483        return '\n\n';
 484      }
 485  
 486      return '\n';
 487    }); // Fix line breaks around <div>.
 488  
 489    html = html.replace(/\s*<div/g, '\n<div');
 490    html = html.replace(/<\/div>\s*/g, '</div>\n'); // Fix line breaks around caption shortcodes.
 491  
 492    html = html.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi, '\n\n[caption$1[/caption]\n\n');
 493    html = html.replace(/caption\]\n\n+\[caption/g, 'caption]\n\n[caption'); // Pad block elements tags with a line break.
 494  
 495    html = html.replace(new RegExp('\\s*<((?:' + blocklist2 + ')(?: [^>]*)?)\\s*>', 'g'), '\n<$1>');
 496    html = html.replace(new RegExp('\\s*</(' + blocklist2 + ')>\\s*', 'g'), '</$1>\n'); // Indent <li>, <dt> and <dd> tags.
 497  
 498    html = html.replace(/<((li|dt|dd)[^>]*)>/g, ' \t<$1>'); // Fix line breaks around <select> and <option>.
 499  
 500    if (html.indexOf('<option') !== -1) {
 501      html = html.replace(/\s*<option/g, '\n<option');
 502      html = html.replace(/\s*<\/select>/g, '\n</select>');
 503    } // Pad <hr> with two line breaks.
 504  
 505  
 506    if (html.indexOf('<hr') !== -1) {
 507      html = html.replace(/\s*<hr( [^>]*)?>\s*/g, '\n\n<hr$1>\n\n');
 508    } // Remove line breaks in <object> tags.
 509  
 510  
 511    if (html.indexOf('<object') !== -1) {
 512      html = html.replace(/<object[\s\S]+?<\/object>/g, function (a) {
 513        return a.replace(/[\r\n]+/g, '');
 514      });
 515    } // Unmark special paragraph closing tags.
 516  
 517  
 518    html = html.replace(/<\/p#>/g, '</p>\n'); // Pad remaining <p> tags whit a line break.
 519  
 520    html = html.replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g, '\n$1'); // Trim.
 521  
 522    html = html.replace(/^\s+/, '');
 523    html = html.replace(/[\s\u00a0]+$/, '');
 524  
 525    if (preserveLinebreaks) {
 526      html = html.replace(/<wp-line-break>/g, '\n');
 527    }
 528  
 529    if (preserveBr) {
 530      html = html.replace(/<wp-temp-br([^>]*)>/g, '<br$1>');
 531    } // Restore preserved tags.
 532  
 533  
 534    if (preserve.length) {
 535      html = html.replace(/<wp-preserve>/g, function () {
 536        return preserve.shift();
 537      });
 538    }
 539  
 540    return html;
 541  }
 542  
 543  
 544  /***/ }),
 545  
 546  /***/ 35:
 547  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 548  
 549  "use strict";
 550  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
 551  function _arrayWithHoles(arr) {
 552    if (Array.isArray(arr)) return arr;
 553  }
 554  
 555  /***/ }),
 556  
 557  /***/ 36:
 558  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 559  
 560  "use strict";
 561  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
 562  function _nonIterableRest() {
 563    throw new TypeError("Invalid attempt to destructure non-iterable instance");
 564  }
 565  
 566  /***/ })
 567  
 568  /******/ });


Generated: Fri Jan 24 01:00:03 2020 Cross-referenced by PHPXref 0.7.1