From 28d964ddd30b070cdbeb7c1a0fdab172e9da6dda Mon Sep 17 00:00:00 2001 From: Platima Date: Wed, 13 Mar 2024 13:12:35 +0800 Subject: [PATCH] Added firstline regex for HTML, CSS, SQL and JSON --- hrc/hrc/proto.hrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hrc/hrc/proto.hrc b/hrc/hrc/proto.hrc index f8f0466..5138a54 100644 --- a/hrc/hrc/proto.hrc +++ b/hrc/hrc/proto.hrc @@ -246,18 +246,27 @@ /\.[^ptr]??html?$/i /^\s*<((!DOCTYPE\s+)?HTML|!\-\-)/i + /^\s*<(html|head|title|body)\b/i + /^\s*<(div|span|a|script|style|table|form)\b/i + + + /\.css$/i + /^\s*[\.\#\w-]+\s*\{/i + + + @@ -570,8 +579,13 @@ /\.sql$/i + /^\s*(SELECT|INSERT INTO|UPDATE|DELETE FROM)\s+.*?\s+(FROM|INTO|SET|WHERE)\b/i + /^\s*--.*$|^\s*\/\*.*\*\/$/i + + + @@ -1006,6 +1020,7 @@ /\.json$/i + /^\s*\{\s*"\w+":/i