From 4562b1727c5b97861f50af2fcb2f3a884a9e8aa0 Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Sun, 18 Dec 2022 13:17:21 +0100 Subject: [PATCH] mime_db: add a sniffing rule for css MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just like the one for HTML, we have to do a bit of guessing since there is no easy structure. We can extend it with more keyowrds or remove some if we find some problems with other files. Tested so far with the Be Book and Haiku user guide CSS files. Fixes #18144. Change-Id: If04fba18846d17ba0eb28dd0bd12787f1fe32028 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5948 Tested-by: Commit checker robot Reviewed-by: Máximo Castañeda Reviewed-by: Adrien Destugues Reviewed-by: nephele --- src/data/mime_db/text/css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/data/mime_db/text/css b/src/data/mime_db/text/css index c51ec71477..f37d88962c 100644 --- a/src/data/mime_db/text/css +++ b/src/data/mime_db/text/css @@ -9,3 +9,5 @@ resource(3, "META:EXTENS") message(234) { "extensions" = "css", "type" = "text/css" }; + +resource(4, "META:SNIFF_RULE") "0.32 [0:1024](\"\\012html {\" | \"background-color:\" | \"\\012body {\" | \"\\012:root {\" | \"\\012@media: (\" | \"padding-left:\")";