diff --git a/src/Extension/CommonMark/Renderer/Block/FencedCodeRenderer.php b/src/Extension/CommonMark/Renderer/Block/FencedCodeRenderer.php index bfdc636a50..8df9a40e89 100644 --- a/src/Extension/CommonMark/Renderer/Block/FencedCodeRenderer.php +++ b/src/Extension/CommonMark/Renderer/Block/FencedCodeRenderer.php @@ -42,9 +42,10 @@ public function render(Node $node, ChildNodeRendererInterface $childRenderer): \ $infoWords = $node->getInfoWords(); if (\count($infoWords) !== 0 && $infoWords[0] !== '') { $class = $infoWords[0]; - if (!\str_starts_with($class, 'language-')) { + if (! \str_starts_with($class, 'language-')) { $class = 'language-' . $class; } + $attrs->append('class', $class); }