@ -44,9 +44,11 @@ func lexIdent(l *Lexer) stateFn {
case isHeading(s):
l.emit(ItemIdent)
return lexHeading
}
return nil
panic("we shouldn't be here")
return nil // this shouldn't ever be reached
func lexHeading(l *Lexer) stateFn {
@ -78,7 +80,8 @@ func lexText(l *Lexer) stateFn {
r := l.next()
switch {
case r == EOF || r == '\n':
return l.errorf("wikilink terminated incorrectly")
l.emit(ItemText)