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

Function Rules

static/word2md/turndown.js:294–311  ·  view source on GitHub ↗

* Manages a collection of rules used to convert HTML to Markdown

(options)

Source from the content-addressed store, hash-verified

292 */
293
294function Rules (options) {
295 this.options = options;
296 this._keep = [];
297 this._remove = [];
298
299 this.blankRule = {
300 replacement: options.blankReplacement
301 };
302
303 this.keepReplacement = options.keepReplacement;
304
305 this.defaultRule = {
306 replacement: options.defaultReplacement
307 };
308
309 this.array = [];
310 for (var key in options.rules) this.array.push(options.rules[key]);
311}
312
313Rules.prototype = {
314 add: function (key, rule) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected