public static function formatExampleComment($example)
    {
        // Remove possible code tag
        $example = self::stripCodeTags($example);

        if( preg_match('/(\n       )/', $example) ) {
            $example = preg_replace('/(\n       )/', "\n", $example);
        }
        elseif( preg_match('/(\n    )/', $example) ) {
            $example = preg_replace('/(\n    )/', "\n", $example);
        } else {
            $example = preg_replace('/(\n   )/', "\n", $example);
        }
        $type = '';

        // A very naive analysis of the programming language used in the comment
        if( strpos($example, '<?php') !== false ) {
            $type = 'php';
        }
        elseif( strpos($example, 'var ') !== false && strpos($example, '</') === false ) {
            $type = 'js';
        }

        return sprintf("```%s\n%s\n```", $type, trim($example));
    }