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

[Fix] auto detect content which should use source syntax #86

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

mistricky
Copy link
Owner

@mistricky mistricky commented Apr 15, 2024

The syntect distinguishes between LANGUAGE NAME and LANGUAGE NAME Source as two completely different language syntax highlights, this PR change the strategy of how to detect what language syntax highlight should use.

If the content not contains <?php, that indicate this file is a PHP source segment, should use "PHP Source" rather than "PHP"

@mistricky mistricky merged commit ac30b07 into main Apr 15, 2024
1 check passed
@mistricky mistricky deleted the fix/php-highlight branch April 15, 2024 14:33
@mistricky mistricky linked an issue Apr 15, 2024 that may be closed by this pull request
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.

Code highlighting in PHP is... weird?
1 participant