Skip to content

Malformed regex in Lua.plist #19

Description

@lildude

👋 from github-linguist/linguist, the library GitHub.com uses for language detection, and also the repo that tells our syntax highlighter which grammars to use.

The Lua grammar was recently switched to using this repo in github-linguist/linguist#6661 and our grammar compiler has found some malformed regexes in the Lua.plist file. These aren't found in the lua.tmLanguage.json so this is likely to be an inconsistency between the two files:

- [ ] repository `vendor/grammars/lua.tmbundle` (from https://github.com/LuaLS/lua.tmbundle.git) (22 errors)
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@class`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@enum`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@type`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@alias`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)(@operator)\s*(\b[`...": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@cast`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@param`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@return`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@field`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@generic`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@vararg`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@overload`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@deprecated`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@meta`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@private`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@protected`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@package`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@version`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@see`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@diagnostic`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@module`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@(async|nodiscard)`": lookbehind assertion is not fixed length (at offset 13))

If it helps, our grammar highlighting engine uses PCRE for performance reasons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions