From ef8385b82bf913c09e626115bb11af9ab9e956f9 Mon Sep 17 00:00:00 2001 From: Abdulla Abdurakhmanov Date: Thu, 15 Aug 2024 15:44:34 +0200 Subject: [PATCH] Better text media type detection --- src/redacters/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/redacters/mod.rs b/src/redacters/mod.rs index 29af954..d99d317 100644 --- a/src/redacters/mod.rs +++ b/src/redacters/mod.rs @@ -131,7 +131,9 @@ impl<'a> Redacters<'a> { || mime.subtype() == mime::XML || mime.subtype() == mime::CSS || mime.subtype() == "x-yaml" - || mime.subtype() == "yaml")) + || mime.subtype() == "yaml" + || mime.subtype() == "markdown" + || mime.subtype().as_str().starts_with("x-"))) || (mime.type_() == mime::APPLICATION && (mime.subtype() == mime::XML || mime.subtype() == mime::JSON