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

@@ -180,6 +180,8 @@ type highlighter struct {
sanitize func(string) string
}
func (h *highlighter) Sanitize(x string) string { return h.sanitize(x) }
func (h *highlighter) HighlightFile(path string, srd StyleResolveData) (highlighted_string string, err error) {
defer func() {
if r := recover(); r != nil {