Skip to content

Commit ddcb81a

Browse files
committed
chore: upgrade PHPStan to v2, normalize 'text' language to 'none' in server-side highlighting
1 parent 9259e5b commit ddcb81a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
"scrivo/highlight.php": "^9.18"
2424
},
2525
"require-dev": {
26-
"szepeviktor/phpstan-wordpress": "^1",
26+
"szepeviktor/phpstan-wordpress": "^2",
2727
"phpstan/extension-installer": "^1",
28-
"phpstan/phpstan": "^1",
28+
"phpstan/phpstan": "^2",
2929
"php-stubs/wordpress-stubs": "^6",
3030
"wp-coding-standards/wpcs": "^3",
3131
"dealerdirect/phpcodesniffer-composer-installer": "^1",

includes/frontend/class-blocks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ protected function render_code_block_server( string $block_content, array $param
440440
// appending.
441441
if ( 'text' === $language ) {
442442
$block_content = str_replace( 'language-text', 'language-none', $block_content );
443-
$language = '';
443+
$language = 'none';
444444
}
445445

446446
// ── Extract raw code from saved HTML ──────────────────────────────────

0 commit comments

Comments
 (0)