public function afterConvert(ConvertEvent $convertEvent): void
    {
        if ($convertEvent->isHandledBy(SculpinMarkdownBundle::CONVERTER_NAME, SculpinTwigBundle::FORMATTER_NAME)) {
            $content = $convertEvent->source()->content();
            $content = preg_replace(self::$removePlaceholderRe, '', $content);
            $content = preg_replace(
                '/<div data-(\w+)="(\w+\++\w+)">(.*?)<\/div>/Us',
                '{% $1 \'$2\' %}$3{% end$1 %}',
                $content
            );
            $convertEvent->source()->setContent($content);
        }
    }
public function afterConvert(ConvertEvent $convertEvent): void
    {
        if ($convertEvent->isHandledBy(SculpinMarkdownBundle::CONVERTER_NAME, SculpinTwigBundle::FORMATTER_NAME)) {
            $content = $convertEvent->source()->content();
            $content = preg_replace(self::$removePlaceholderRe, '', $content);
            $content = preg_replace(
                '/<div data-(\w+)="(\w+\++\w+)">(.*?)<\/div>/Us',
                '{% $1 \'$2\' %}$3{% end$1 %}',
                $content
            );
            $convertEvent->source()->setContent($content);
        }
    }
public function afterConvert ( ConvertEvent $ convertEvent ) : void { if ( $ convertEvent -> isHandledBy ( SculpinMarkdownBundle :: CONVERTER_NAME , SculpinTwigBundle :: FORMATTER_NAME ) ) { $ content = $ convertEvent -> source ( ) -> content ( ) ; $ content = preg_replace ( self :: $ removePlaceholderRe , '' , $ content ) ; $ content = preg_replace ( '/<div data-(\w+)="(\w+\++\w+)">(.*?)<\/div>/Us' , '{% $1 \'$2\' %}$3{% end$1 %}' , $ content ) ; $ convertEvent -> source ( ) -> setContent ( $ content ) ; } }
Called after conversion
Called after conversion