code: def _parse(self, text):
          '''
          Parse text with frontmatter, return metadata and content.
          If frontmatter is not found, returns an empty metadata dictionary and original text content.
          '''
          # ensure unicode first
          text = str(text).strip()
  
          if not text.startswith(DELIMITER):
              return {}, text
  
          try:
              _, fm, content = BOUNDARY.split(text, 2)
          except ValueError:
              # if we can't split, bail
              return {}, text
          # loader_class = self.loader_factory(self)
          metadata = yaml.load(fm, Loader=self.loader_class)
          metadata = metadata if (isinstance(metadata, dict)) else {}
          return metadata, contenf _parse(self, text):
          '''
          Parse text with frontmatter, return metadata and content.
          If frontmatter is not found, returns an empty metadata dictionary and original text content.
          '''
          # ensure unicode first
          text = str(text).strip()
  
          if not text.startswith(DELIMITER):
              return {}, text
  
          try:
              _, fm, content = BOUNDARY.split(text, 2)
          except ValueError:
              # if we can't split, bail
              return {}, text
          # loader_class = self.loader_factory(self)
          metadata = yaml.load(fm, Loader=self.loader_class)
          metadata = metadata if (isinstance(metadata, dict)) else {}
          return metadata, content
docs: Parse text with frontmatter, return metadata and content.
          If frontmatter is not found, returns an empty metadata dictionary and original text content.