// Generated by CoffeeScript 1.12.7
var MarkdownEscape;

MarkdownEscape = (function() {
  function MarkdownEscape() {}

  MarkdownEscape.replacements = [[/\*/g, '\\*', 'asterisks'], [/#/g, '\\#', 'number signs'], [/\//g, '\\/', 'slashes'], [/\(/g, '\\(', 'parentheses'], [/\)/g, '\\)', 'parentheses'], [/\[/g, '\\[', 'square brackets'], [/\]/g, '\\]', 'square brackets'], [/</g, '&lt;', 'angle brackets'], [/>/g, '&gt;', 'angle brackets'], [/_/g, '\\_', 'underscores']];

  MarkdownEscape.escape = function(string, skips) {
    skips = skips || [];
    return this.replacements.reduce((function(_this) {
      return function(string, replacement) {
        var name;
        name = replacement[2];
        if (name && skips.indexOf(name) !== -1) {
          return string;
        } else {
          return string.replace(replacement[0], replacement[1]);
        }
      };
    })(this), string);
  };

  return MarkdownEscape;

})();
