code: func (l *pageLexer) lexFrontMatterSection(tp ItemType, delimr rune, name string, delim []byte) stateFunc {
  
  	for i := 0; i < 2; i++ {
  		if r := l.next(); r != delimr {
  			return l.errorf("invalid %s delimiter", name)
  		}
  	}
  
  	// Let front matter start at line 1
  	wasEndOfLine := l.consumeCRLF()
  	// We don't care about the delimiters.
  	l.ignore()
  
  	var r rune
  
  	for {
  		if !wasEndOfLine {
  			r = l.next()
  			if r == eof {
  				return l.errorf("EOF looking for end %s front matter delimiter", name)
  			}
  		}
  
  		if wasEndOfLine || isEndOfLine(r) {
  			if l.hasPrefix(delim) {
  				l.emit(tp)
  				l.pos += 3
  				l.consumeCRLF()
  				l.ignore()
  				break
  			}
  		}
  
  		wasEndOfLine = false
  	}
  
  	return lexMainSection
  }
docs: // Handle YAML or TOML front matter.