code: def _meta_from_regex(self, m):
          
          body = m.group('body')
          is_notebook = m.group('sep_close') == '---'
  
          if is_notebook:
              # make it into a valid YAML object by stripping ---
              body = body.strip()[:-3] + '...'
          try:
              if body:
                  return self._meta(yaml.safe_load(m.group('body')), is_notebook)
              else:
                  return self._meta({'ipymd': {'empty_meta': True}}, is_notebook)
          except Exception as err:
              raise Exception(body, err)
docs: Extract and parse YAML metadata from a meta match
  
          Notebook metadata must appear at the beginning of the file and follows
          the Jekyll front-matter convention of dashed delimiters:
  
              ---
              some: yaml
              ---
  
          Cell metadata follows the YAML spec of dashes and periods
  
              ---
              some: yaml
              ...
  
          Both must be followed by at least one blank line (\n\n).