* Manages a collection of rules used to convert HTML to Markdown
(options)
| 292 | */ |
| 293 | |
| 294 | function 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 | |
| 313 | Rules.prototype = { |
| 314 | add: function (key, rule) { |
nothing calls this directly
no outgoing calls
no test coverage detected