From 94dceb4f7c1740de9215b36ec183f93ca4337ee7 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Thu, 2 Oct 2025 19:52:38 +0200 Subject: style(markdown): fix typo in package name --- mardown/error.go | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 mardown/error.go (limited to 'mardown/error.go') diff --git a/mardown/error.go b/mardown/error.go deleted file mode 100644 index ad279fe..0000000 --- a/mardown/error.go +++ /dev/null @@ -1,43 +0,0 @@ -package mardown - -import "fmt" - -type ParseError struct { - internal error - lxs lexers -} - -func (e *ParseError) Error() string { - return e.internal.Error() -} - -func (e *ParseError) Pretty() string { - lxs := e.lxs - if lxs.lexers == nil { - return e.internal.Error() - } - current := lxs.current - 1 - for lxs.Before() && lxs.Current().Type != lexerBreak { - } - current -= lxs.current - contxt := "" - ind := "" - for lxs.Next() && lxs.Current().Type != lexerBreak { - contxt += lxs.Current().Value - if lxs.current <= current { - ch := "~" - if lxs.current == current { - ch = "^" - } - for range len(lxs.Current().Value) { - ind += ch - } - } - } - if lxs.current == current { - runes := []rune(ind) - runes[len(runes)-1] = '^' - ind = string(runes) - } - return fmt.Sprintf("%v\n\n%s\n%s", e, contxt, ind) -} -- cgit v1.2.3