github-linguist / github-linguist/linguist

Outstanding Grammar Issues

Open
#3,924 42 comments 2 reactions 0 assignees View on GitHub
Help Wanted
Dominant language
Ruby
Stars
13.7k
Forks
5.4k
Avg merge
1d 15h
Merged PRs (30d)
17

Description

The following is a detailed list of all the outstanding issues in the grammars that GitHub.com uses for syntax highlighting the code in our website.

These issues are detected by our grammars compiler (https://github.com/github/linguist/pull/3915) and are probably causing minor rendering bugs in the website.

**Help is very much welcome!** If you're seeing bugs or rendering issues in your source code in GitHub, please start by taking a look at this list to make sure we're not detecting any issues in your language's grammar.

Feel free to ask any questions about any given issue and what would be the appropriate way to fix it. I'll keep the issue up-to-date as I work through grammar fixes myself.

cc @github/linguist @pchaigno @Alhadis

---

**Last updated: 26 Aug 2026**

- [ ] repository `vendor/grammars/MATLAB-Language-grammar` (from https://github.com/mathworks/MATLAB-Language-grammar) (16 errors)
- Invalid regex in grammar: `source.matlab` (in `Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage`) contains a malformed regex (regex "`(\}|(?(? (?: (?: [\`...": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 68))
- Invalid regex in grammar: `source.turtle` (in `Syntaxes/Turtle.tmLanguage`) contains a malformed regex (regex "`(?x) (?[\p{L}\p{M`...": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 73))
- Invalid regex in grammar: `source.turtle` (in `Syntaxes/Turtle.tmLanguage`) contains a malformed regex (regex "`(?x)((?<=\s|^|_)(?:[\p{L}\p{M}] `...": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 57))
- Invalid regex in grammar: `source.turtle` (in `Syntaxes/Turtle.tmLanguage`) contains a malformed regex (regex "`(?x)( (?: [\p{L}\p{M}] | [:0`...": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 121))
- Invalid regex in grammar: `source.turtle` (in `Syntaxes/Turtle.tmLanguage`) contains a malformed regex (regex "`\[[\u20\u9\uD\uA]*\]`": PCRE does not support \L, \l, \N{name}, \U, or \u (at offset 4))

- [ ] repository `vendor/grammars/vscode-ibmi-languages` (from https://github.com/barrettotte/vscode-ibmi-languages) (4 errors)
- Invalid regex in grammar: `source.dds.dspf` (in `syntaxes/dds.dspf.tmLanguage.json`) contains a malformed regex (regex "`(?i)(?<=^.{44}.{0,35})&[A-Z][A-Z`...": lookbehind assertion is not fixed length (at offset 21))
- Invalid regex in grammar: `source.dds.prtf` (in `syntaxes/dds.prtf.tmLanguage.json`) contains a malformed regex (regex "`(?i)(?<=^.{44}.{0,35})&[A-Z][A-Z`...": lookbehind assertion is not fixed length (at offset 21))
- Invalid regex in grammar: `source.rpgle` (in `syntaxes/rpgle.tmLanguage.json`) contains a malformed regex (regex "`(?i)(?<=(?<=^.{5}C)(?:.{21}|.{22`...": lookbehind assertion is not fixed length (at offset 70))
- Invalid regex in grammar: `source.dds.icff` (in `syntaxes/dds.icff.tmLanguage.json`) contains a malformed regex (regex "`(?i)(?<=^.{44}.{0,35})&[A-Z][A-Z`...": lookbehind assertion is not fixed length (at offset 21))

- [ ] repository `vendor/grammars/vscode-yara` (from https://github.com/infosec-intern/vscode-yara.git) (1 errors)
- 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))
---

## Other

The following grammars are not being updated due to problems with the grammars:

- `vendor/grammars/Sublime-QML` - [skozlovf/Sublime-QML](https://github.com/skozlovf/Sublime-QML) - the project has been restructured and rewritten and only provides a Sublime 3 compatible grammar which is not supported.
- `vendor/grammars/cds-textmate-grammar` recently introduced changes that resulted in over 20 `unknown property name after \P or \p` errors so we've not updated that grammar.
- `vendor/grammars/VscodeAdblockSyntax` fails to compile so won't be updated until resolved.
- `vendor/grammars/zenstack` - restructured and now doesn't contain a complete grammar file.

Contributor guide

Open the contributing guide

Research direction

Start with the grammar compiler described in pull request 3915 and choose one affected repository under vendor/grammars, such as MATLAB-Language-grammar or TypeScript-TmLanguage. Reproduce the listed invalid-regex report in that grammar and trace it to the source grammar file. Done means the selected grammar compiles without its reported errors and no longer causes the corresponding syntax-highlighting issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.