MediatedCommunications / Mime-Detective

Other
87 stars 10 forks source link

Yaml file identified as EML file #37

Open bsinghal-copperleaf opened 2 months ago

bsinghal-copperleaf commented 2 months ago

The file below gets marked as an EML file because the word "FROM" appears in the text. The word from obviously comes way after the starting few bytes and so not sure why it is being marked as an EML file.

To reproduce, just download the attached file. Change it's extension to .yaml and try to run the inspection on it with all the default definitions loaded in.

NOTE : You might not even need to change the extension but I had to for uploading it to GitHub

recipe.txt

bsinghal-copperleaf commented 2 months ago

Code:

_textInspector = new ContentInspectorBuilder
{
    Definitions = MimeDetective.Definitions.Default.All()
}.Build();
inspectionResult = _textInspector.Inspect(filePath);

The result was /// eml 4 point.