code: func (m *Matter) split(data []byte, atEOF bool) (advance int, token []byte, err error) {
  	if atEOF && len(data) == 0 {
  		return 0, nil, nil
  	}
  	delim, err := sniffDelim(data)
  	if err != nil {
  		return 0, nil, err
  	}
  	if _, ok := m.handlers[delim]; !ok {
  		return 0, nil, ErrUnknownDelim
  	}
  	if x := bytes.Index(data, []byte(delim)); x >= 0 {
  		// check the next delim index
  		if next := bytes.Index(data[x+len(delim):], []byte(delim)); next > 0 {
  			return next + len(delim), dropSpace(data[:next+len(delim)]), nil
  		}
  		return len(data), dropSpace(data[x+len(delim):]), nil
  	}
  	if atEOF {
  		return len(data), data, nil
  	}
  	return 0, nil, nil
  }
docs: //split implements bufio.SplitFunc for spliting front matter from the body text.