docs: function escape(string) {
    var snippets = [];
  
    // Replace all code snippets with a token.
    string = string.replace(reCode, function(match) {
      snippets.push(match);
      return token;
    });
  
    _.forOwn(htmlEscapes, function(replacement, chr) {
      string = string.replace(RegExp('(\\\\?)\\' + chr, 'g'), function(match, backslash) {
        return backslash ? match : replacement;
      });
    });
  
    // Replace all tokens with code snippets.
    return string.replace(reToken, function(match) {
      return snippets.shift();
    });
  }