Implement previews for plain text files

This commit is contained in:
Kovid Goyal
2025-07-20 19:24:17 +05:30
parent 28fce006d6
commit bd0f55531f
10 changed files with 185 additions and 25 deletions

View File

@@ -44,6 +44,7 @@ func NewSanitizeControlCodes(replace_tab_by string) *SanitizeControlCodes {
type Highlighter interface {
HighlightFile(path string, srd StyleResolveData) (highlighted_string string, err error)
Sanitize(string) string
}
func NewHighlighter(sanitize func(string) string) Highlighter {