code: function Plugin(regexp, replacer, id) {
      // return value should be a callable function
      // with strictly defined options passed by markdown-it
      var self = function(md, options) {
          self.options = options;
          self.init(md);
      };
  
      // initialize plugin object
      self.__proto__ = Plugin.prototype;
  
      // clone regexp with all the flags
      var flags = (regexp.global ? 'g' : '') + (regexp.multiline ? 'm' : '') + (regexp.ignoreCase ? 'i' : '');
  
      self.regexp = RegExp('^' + regexp.source, flags);
  
      // copy init options
      self.replacer = replacer;
  
      // this plugin can be inserted multiple times,
      // so we're generating unique name for it
      self.id = id ? id : 'regexp-' + counter;
      counter++;
  
      return self;
  }
docs: Constructor function