original_string: public static function processMarkdown($string, $block = true)
      {
          $page     = Grav::instance()['page'] ?? null;
          $defaults = Grav::instance()['config']->get('system.pages.markdown');
  
          // Initialize the preferred variant of Parsedown
          if ($defaults['extra']) {
              $parsedown = new ParsedownExtra($page, $defaults);
          } else {
              $parsedown = new Parsedown($page, $defaults);
          }
  
          if ($block) {
              $string = $parsedown->text($string);
          } else {
              $string = $parsedown->line($string);
          }
  
          return $string;
      }
code: public static function processMarkdown($string, $block = true)
      {
          $page     = Grav::instance()['page'] ?? null;
          $defaults = Grav::instance()['config']->get('system.pages.markdown');
  
          // Initialize the preferred variant of Parsedown
          if ($defaults['extra']) {
              $parsedown = new ParsedownExtra($page, $defaults);
          } else {
              $parsedown = new Parsedown($page, $defaults);
          }
  
          if ($block) {
              $string = $parsedown->text($string);
          } else {
              $string = $parsedown->line($string);
          }
  
          return $string;
      }
code_tokens: public static function processMarkdown ( $ string , $ block = true ) { $ page = Grav :: instance ( ) [ 'page' ] ?? null ; $ defaults = Grav :: instance ( ) [ 'config' ] -> get ( 'system.pages.markdown' ) ; // Initialize the preferred variant of Parsedown if ( $ defaults [ 'extra' ] ) { $ parsedown = new ParsedownExtra ( $ page , $ defaults ) ; } else { $ parsedown = new Parsedown ( $ page , $ defaults ) ; } if ( $ block ) { $ string = $ parsedown -> text ( $ string ) ; } else { $ string = $ parsedown -> line ( $ string ) ; } return $ string ; }
docstring: Process a string as markdown
  
  @param string $string
  
  @param bool $block  Block or Line processing
  @return string
docstring_tokens: Process a string as markdown