Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 PHP files are syntax highlighted as if they were HTML #1207

Open
Bilge opened this issue Oct 9, 2022 · 3 comments
Open

🐛 PHP files are syntax highlighted as if they were HTML #1207

Bilge opened this issue Oct 9, 2022 · 3 comments

Comments

@Bilge
Copy link

Bilge commented Oct 9, 2022

Despite delta --list-languages showing the following output, it seems it does not apply highlighting to .php files.

PHP php, php3, php4, php5, php7, phps, phpt, phtml

It seems I do get syntax highlighting for JSON, YAML and other files, so the feature is working, but just not for PHP files. This seems to be because it is highlighting in HTML mode, as if the file did not begin with <?php (even though it does) to switch it to PHP mode, which is verifiable by adding <Tags> in comments and observing they become highlighted.

image

git -v

git version 2.38.0.windows.1

delta -V

delta 0.14.0

@Bilge Bilge changed the title 🐛 Syntax highlighting does not work for PHP files 🐛 Syntax highlighting does not work correctly for PHP files Oct 17, 2022
@Bilge Bilge changed the title 🐛 Syntax highlighting does not work correctly for PHP files 🐛 PHP files are syntax highlighted as if they were HTML Oct 17, 2022
@nickygerritsen
Copy link

This seems to happen only when the <?php is not in the diff. Example:
image

@Bilge
Copy link
Author

Bilge commented Mar 19, 2023 via email

@pprkut
Copy link

pprkut commented Sep 11, 2023

Duplicate of #162

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

No branches or pull requests

3 participants