Skip to content

Error detecting file type by signature #3201

@taconi

Description

@taconi

Description of the problem or steps to reproduce

When opening the Pipfile.lock file it looks like this:

{
    "_meta": {}
}

The type shown is unknown, but as specified in the signature of the file:

https://github.com/zyedidia/micro/blob/433879046e18c79a6780080b233b04154582cbf7/runtime/syntax/json.yaml#L1-L5

I did the same test with the file named index with the following content:

<!DOCTYPE html5>

From what I understand, both should be of type json and html5 given the signature of html5:

https://github.com/zyedidia/micro/blob/433879046e18c79a6780080b233b04154582cbf7/runtime/syntax/html5.yaml#L1-L5

I didn't get to test the other types of files that can be defined with signature but as both files should match with the regex I believe the same thing must be happening.

This does not happen in version 2.0.13.
The file detection was changed with #2819.

Specifications

Commit hash: b518bda
OS: Ubuntu 22.04.3 LTS
Terminal: terminator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions