[fix] Disable separate selector characters for PDF and XML

Lagrange does not recocnise 'P' and 'X' types as links.
This commit is contained in:
2026-05-22 11:04:00 +02:00
parent 7b6e641ce4
commit e0bb258de0
-6
View File
@@ -90,14 +90,8 @@ func (params *GopherTypeCharParams) GopherTypeChar(path string, isDir bool) stri
return "I" return "I"
case strings.HasPrefix(mimeType, "audio/"): case strings.HasPrefix(mimeType, "audio/"):
return "s" return "s"
case mimeType == "application/pdf":
return "P"
case strings.HasPrefix(mimeType, "text/html"): case strings.HasPrefix(mimeType, "text/html"):
return "h" return "h"
case strings.HasPrefix(mimeType, "text/rtf"):
return "r"
case strings.HasPrefix(mimeType, "text/xml") || strings.HasPrefix(mimeType, "application/xml"):
return "X"
default: default:
return "9" return "9"
} }