More concurrency debugging

main
Nick Dumas 1 year ago
parent c963462545
commit b9e1bab075

@ -150,6 +150,7 @@ func (l *Lexer) next() rune {
} }
func (l *Lexer) run() { func (l *Lexer) run() {
defer l.chanMutex.Unlock()
for state := lexText; state != nil; { for state := lexText; state != nil; {
state = state(l) state = state(l)
} }

@ -2,6 +2,8 @@ package wikilink
import ( import (
"strings" "strings"
"go.uber.org/zap"
) )
func isOpenLink(s string) bool { func isOpenLink(s string) bool {
@ -27,6 +29,9 @@ func isBlockRef(s string) bool {
func lexIdent(l *Lexer) stateFn { func lexIdent(l *Lexer) stateFn {
for { for {
r := l.next() r := l.next()
l.L.Named("lexIdent").Debug("stepping through lexIdent",
zap.String("r", string(r)),
)
s := l.input[l.GetPos():] s := l.input[l.GetPos():]
if r == '\\' { // i think this will handle escape characters? if r == '\\' { // i think this will handle escape characters?
break break

Loading…
Cancel
Save