Contents

Parsedown::blockCode( $Line,  $Block = null )

Description

Source

File: bp-help/vendors/parsedown/Parsedown.php

    protected function blockCode($Line, $Block = null)
    {
        if (isset($Block) and $Block['type'] === 'Paragraph' and ! isset($Block['interrupted']))
        {
            return;
        }

        if ($Line['indent'] >= 4)
        {
            $text = substr($Line['body'], 4);

            $Block = array(
                'element' => array(
                    'name' => 'pre',
                    'element' => array(
                        'name' => 'code',
                        'text' => $text,
                    ),
                ),
            );

            return $Block;
        }
    }

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.