HTML tags instead of in order to * match front-end markdown-it rendering. */ class CustomStrikethroughRenderer implements InlineRendererInterface { public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer) { if (!($inline instanceof Strikethrough)) { throw new \InvalidArgumentException('Incompatible inline type: ' . get_class($inline)); } return new HtmlElement('s', $inline->getData('attributes', []), $htmlRenderer->renderInlines($inline->children())); } }