Allow custom highlight mapping beyond file extensions #15808

Merged
mlpo merged 4 commits from highlight-patch into main 2021-05-13 09:31:24 +00:00
mlpo commented 2021-05-09 17:46:09 +00:00 (Migrated from github.com)

Until now, custom highlight mapping was only possible between file extensions. In some cases, this can be limiting, especially when the desired Lexer does not define any file extension (e.g., Django lexer).

This PR makes it possible to map a file extension to any attribute that Chroma looks for (i.e., name, alias, file extension).

Until now, custom highlight mapping was only possible between file extensions. In some cases, this can be limiting, especially when the desired Lexer does not define any file extension (e.g., [Django lexer](https://github.com/go-gitea/gitea/blob/af7ffaa2798148e2a1b249da2330200bc032d7b1/vendor/github.com/alecthomas/chroma/lexers/d/django.go)). This PR makes it possible to map a file extension to any attribute that Chroma looks for (i.e., name, alias, file extension).
zeripath approved these changes 2021-05-12 22:43:09 +00:00
lafriks (Migrated from github.com) approved these changes 2021-05-13 00:27:20 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#15808
No description provided.