from been.core import DirectorySource, source_registry

class Markdown(DirectorySource):
    kind = 'markdown'
    def process_event(self, event):
        lines = event['content'].splitlines()
        event['title'] = lines[0]
        event['content'] = "\n".join(lines[1:])
        event['summary'] = event['content']
        return event
source_registry.add(Markdown)

from been.core import DirectorySource, source_registry

class MarkdownDirectory(DirectorySource):
    kind = 'markdown'
    def process_event(self, event):
        lines = event['content'].splitlines()
        event['title'] = lines[0]
        event['content'] = "\n".join(lines[1:])
        event['summary'] = event['content']
        return event
source_registry.add(MarkdownDirectory)

Rename Markdown source to MarkdownDirectory.
Rename Markdown source to MarkdownDirectory.

  from been.core import DirectorySource, source_registry
  
- class Markdown(DirectorySource):
+ class MarkdownDirectory(DirectorySource):
      kind = 'markdown'
      def process_event(self, event):
          lines = event['content'].splitlines()
          event['title'] = lines[0]
          event['content'] = "\n".join(lines[1:])
          event['summary'] = event['content']
          return event
- source_registry.add(Markdown)
+ source_registry.add(MarkdownDirectory)
  
Rename Markdown source to MarkdownDirectory.
## Code Before:
from been.core import DirectorySource, source_registry

class Markdown(DirectorySource):
    kind = 'markdown'
    def process_event(self, event):
        lines = event['content'].splitlines()
        event['title'] = lines[0]
        event['content'] = "\n".join(lines[1:])
        event['summary'] = event['content']
        return event
source_registry.add(Markdown)

## Instruction:
Rename Markdown source to MarkdownDirectory.
## Code After:
from been.core import DirectorySource, source_registry

class MarkdownDirectory(DirectorySource):
    kind = 'markdown'
    def process_event(self, event):
        lines = event['content'].splitlines()
        event['title'] = lines[0]
        event['content'] = "\n".join(lines[1:])
        event['summary'] = event['content']
        return event
source_registry.add(MarkdownDirectory)
