MCPcopy Create free account
hub / github.com/TruthHun/BookStack / postProcess

Function postProcess

static/word2md/turndown.js:829–838  ·  view source on GitHub ↗

* Appends strings as each rule requires and trims the output * @private * @param {String} output The conversion output * @returns A trimmed version of the ouput * @type String

(output)

Source from the content-addressed store, hash-verified

827 */
828
829function postProcess (output) {
830 var self = this;
831 this.rules.forEach(function (rule) {
832 if (typeof rule.append === 'function') {
833 output = join(output, rule.append(self.options));
834 }
835 });
836
837 return output.replace(/^[\t\r\n]+/, '').replace(/[\t\r\n\s]+$/, '')
838}
839
840/**
841 * Converts an element node to its Markdown equivalent

Callers

nothing calls this directly

Calls 1

joinFunction · 0.85

Tested by

no test coverage detected