UNPKG

@wordpress/wordcount

Version:
18 lines (17 loc) 644 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = transposeHTMLEntitiesToCountableChars; /** * Replaces items matched in the regex with a single character. * * @param {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions * @param {string} text The string being counted. * * @return {string} The manipulated text. */ function transposeHTMLEntitiesToCountableChars(settings, text) { return text.replace(settings.HTMLEntityRegExp, 'a'); } //# sourceMappingURL=transposeHTMLEntitiesToCountableChars.js.map