]> Lady’s Gitweb - Shushe/commitdiff
Reduce the strength of magic matches
authorLady <redacted>
Wed, 31 Jan 2024 05:34:32 +0000 (00:34 -0500)
committerLady <redacted>
Wed, 31 Jan 2024 05:34:32 +0000 (00:34 -0500)
The strength of magic matches is based on the length of the first line.
Boost this by `100` by default, but add an additional `10` for each
byte in additional match lines. This should provide a more comfortable
set of default strengths to work with.

magic/css
magic/js
magic/record-jar
magic/tsv
magic/xml

index 24bbf5af5056d23d1ccf7206cd787d53eecad95d..718ce18f9f66e8d18c022350d6846a29aa9c237e 100644 (file)
--- a/magic/css
+++ b/magic/css
@@ -1,14 +1,14 @@
 0     string  /*css        CSS text
 !:mime text/css
 0     string  /*css        CSS text
 !:mime text/css
-!:strength + 255
+!:strength + 100
 
 0     string  @charset\ "  CSS text
 !:mime text/css
 
 0     string  @charset\ "  CSS text
 !:mime text/css
-!:strength + 255
+!:strength + 100
 
 0     byte    0xEF
 >1    byte    0xBB
 >>2   byte    0xBF
 >>>3  string  @charset\ "  CSS text
 !:mime text/css
 
 0     byte    0xEF
 >1    byte    0xBB
 >>2   byte    0xBF
 >>>3  string  @charset\ "  CSS text
 !:mime text/css
-!:strength + 255
+!:strength + 130
index 971c95f111a2ac09c6d9888d42322f1357fec4dc..aa8cbc5015dd16ddb3739f20eec1a2e78d57254f 100644 (file)
--- a/magic/js
+++ b/magic/js
@@ -1,7 +1,7 @@
 0  string  #!js          Javascript text
 !:mime text/javascript
 0  string  #!js          Javascript text
 !:mime text/javascript
-!:strength + 255
+!:strength + 100
 
 0  string  #!javascript  Javascript text
 !:mime text/javascript
 
 0  string  #!javascript  Javascript text
 !:mime text/javascript
-!:strength + 255
+!:strength + 100
index f4140d308bcf6552cc193ca4570600571f679dba..8fddcbda673b4e29f95e794f81efad20136a5137 100644 (file)
@@ -1,10 +1,10 @@
 0  string     %%   record-jar text
 !:mime text/record-jar
 0  string     %%   record-jar text
 !:mime text/record-jar
-!:strength + 255
+!:strength + 100
 
 0     byte    0xEF
 >1    byte    0xBB
 >>2   byte    0xBF
 >>>3  string  %%   record-jar text
 !:mime text/record-jar
 
 0     byte    0xEF
 >1    byte    0xBB
 >>2   byte    0xBF
 >>>3  string  %%   record-jar text
 !:mime text/record-jar
-!:strength + 255
+!:strength + 140
index de72924f66e551c2aab1f17539fe00c4b9964aca..2bc05fd60c41c8a7bc22a2f20ee550dfa52c9359 100644 (file)
--- a/magic/tsv
+++ b/magic/tsv
@@ -1,10 +1,10 @@
 0  string  #!tsv     TSV text
 !:mime text/tab-separated-values
 0  string  #!tsv     TSV text
 !:mime text/tab-separated-values
-!:strength + 255
+!:strength + 100
 
 0     byte    0xEF
 >1    byte    0xBB
 >>2   byte    0xBF
 >>>3  string  #!tsv  TSV text
 !:mime text/tab-separated-values
 
 0     byte    0xEF
 >1    byte    0xBB
 >>2   byte    0xBF
 >>>3  string  #!tsv  TSV text
 !:mime text/tab-separated-values
-!:strength + 255
+!:strength + 170
index d4417010db0b1c15475886f61d6cd185c225d60b..5a9a28f5dc93af5c95346648aef4833f2ad451d6 100644 (file)
--- a/magic/xml
+++ b/magic/xml
@@ -1,10 +1,10 @@
 0     string  \<?xml  XML data
 !:mime application/xml
 0     string  \<?xml  XML data
 !:mime application/xml
-!:strength + 255
+!:strength + 100
 
 0     byte    0xEF
 >1    byte    0xBB
 >>2   byte    0xBF
 >>>3  string  \<?xml  XML data
 !:mime application/xml
 
 0     byte    0xEF
 >1    byte    0xBB
 >>2   byte    0xBF
 >>>3  string  \<?xml  XML data
 !:mime application/xml
-!:strength + 255
+!:strength + 170
This page took 0.032622 seconds and 4 git commands to generate.