code: def register(cls, plugin):
          
          cls.plugins[plugin.name] = plugin
  
          # make features
          plugin.features = map(Feature.get, plugin.features)
  
          # fix blocks
          blocks = []
          for pbt in plugin.blocks:
              if pbt:
                  pbt = pbt.copy()
                  pbt.format = plugin.name
              blocks.append(pbt)
          plugin.blocks = blocks
  
          # add blocks
          new_blocks = filter(None, plugin.blocks)
          for pbt in new_blocks:
              for bt in cls.blocks:
                  if (bt.has_command(pbt.command) or
                          bt.has_command(pbt._match)):
                      bt._add_conversion(plugin.name, pbt)
                      break
              else:
                  if pbt._match:
                      raise ValueError, "Couldn't match %r" % pbt._match
                  cls.blocks.append(kurt.BlockType(pbt))
docs: Register a new :class:`KurtPlugin`.
  
          Once registered, the plugin can be used by :class:`Project`, when:
  
          * :attr:`Project.load` sees a file with the right extension
  
          * :attr:`Project.convert` is called with the format as a parameter