Skip to content

Add Support for Additional File Extensions in Syntax Highlighter#2

Open
Neburalis wants to merge 2 commits intomrauter1:mainfrom
Neburalis:main
Open

Add Support for Additional File Extensions in Syntax Highlighter#2
Neburalis wants to merge 2 commits intomrauter1:mainfrom
Neburalis:main

Conversation

@Neburalis
Copy link
Copy Markdown

Extended the functionality of the get_language_from_extension function in git2text.py by adding a wide range of new file extensions with their corresponding language identifiers for Markdown syntax highlighting.

Changes:
Updated the extension_to_language dictionary to include new file extensions such as .abap, .bat, .dockerfile, .go, and many more.
These extensions span a variety of programming languages, markup languages, and configuration files.
The function now returns a more accurate language identifier for a wider range of files.

Additional Information:
This update includes only a small portion of the possible extensions and language mappings. For a more comprehensive list, you can refer to the source from the Linguist language list (list of languages ​​supported by github): languages.yml.

Benefits:
Improved syntax highlighting support for various file types in Markdown files.
Enhanced flexibility for users working with diverse programming languages or configuration files.

Related Issues:
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant