Skip to content

Invalid regex in grammar: lookbehind assertion is not fixed length #71

Open
@lildude

Description

@lildude

👋 I'm the lead maintainer of the https://github.com/github/linguist library which is used for language detection and providing the syntax highlighting for languages on GitHub.com, and we use this grammar.

Our grammar compiler has found a problem with your grammar which I thought I'd let you know about.

This regex is invalid as the lookbehind assertion is not a fixed length (offset 25):

"match": "(?<=(^|[\\)]|\\b(?:them)\\b))(?:\\s*):(?=\\s*(\\(|$))"

https://regex101.com/r/v6bHBI/1

This is the error our compiler reported:

Invalid regex in grammar: source.yara (in yara/syntaxes/yara.tmLanguage.json) contains a malformed regex (regex "(?<=(^|[\)]|\b(?:them)\b))(?:\s*...": lookbehind assertion is not fixed length (at offset 25))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions