HermanMartinus / bearblog

Free, no-nonsense, super fast blogging.
MIT License
2.39k stars 73 forks source link

Inline PHP Highlighting #181

Open vinkla opened 1 year ago

vinkla commented 1 year ago

Feature request; inline PHP syntax highlighting.

If you want to highlight PHP code you need to add <?php before the actual code.

Without <?php:

CleanShot 2022-09-13 at 10 23 45@2x

With <?php:

CleanShot 2022-09-13 at 10 23 27@2x
HermanMartinus commented 1 year ago

I just ran a test here You'll need to specify php at the beginning of the code block for it to be recognised as php (if the <?php isn't present).

```php
Flight::upsert([
...
vinkla commented 1 year ago

Hmm, that is what I'm doing here and it doesn't seem to work.

```php
Flight::upsert([
HermanMartinus commented 1 year ago

Ah, I see what you mean. I should have tested with your exact example. This looks like an issue with pygments which is used for syntax highlighting. If you select PHP on their demo page you get the same issue. I'll log an issue with them.