From fada621a85ab8cec3e7e9cb37e31b2372a831ea6 Mon Sep 17 00:00:00 2001 From: Colin O'Dell Date: Mon, 29 Jan 2024 09:35:33 -0500 Subject: [PATCH] Fix code style violations --- src/Extension/CommonMark/Renderer/Block/FencedCodeRenderer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }