The magic file contains the following rule for text/html
>0=\x00\x0E<!DOCTYPE HTML+257
setting a range-length of 257 bytes preventing detection of the 90 byte html file.
My interpretation of the spec is that the first range-length bytes should be searched for the value, but not that the file needs to be at least range-length bytes long.
The shared-mime-info-spec does not mention it but I assume this check is incorrect https://github.com/mbrubeck/tree_magic/blob/adc1b4024cf0a44fdf9692ee721d36e5e8a03665/src/fdo_magic/check.rs#L8-L10
As an example it prevents mime-type detection of this short html file.
The magic file contains the following rule for text/html
setting a range-length of 257 bytes preventing detection of the 90 byte html file.
My interpretation of the spec is that the first range-length bytes should be searched for the value, but not that the file needs to be at least range-length bytes long.