kirby/kirby/component/markdown.php
/**
   * Initializes the Parsedown parser and 
   * transforms the given markdown to HTML
   * 
   * @param string $markdown
   * @return string
   */
Initializes the Parsedown parser and
transforms the given markdown to HTML

@param string $markdown
@return string
Initializes the Parsedown parser and transforms the given markdown to HTML @param string $markdown @return string
public function parse($markdown) {
    if(!$this->kirby->options['markdown']) {
      return $markdown;
    } else {
      $parsedown = $this->kirby->options['markdown.extra'] ? new ParsedownExtra() : new Parsedown();
      $parsedown->setBreaksEnabled($this->kirby->options['markdown.breaks']);
      return $parsedown->text($markdown);
    }
  }
public function parse ( $ markdown ) { if ( ! $ this -> kirby -> options [ 'markdown' ] ) { return $ markdown ; } else { $ parsedown = $ this -> kirby -> options [ 'markdown.extra' ] ? new ParsedownExtra ( ) : new Parsedown ( ) ; $ parsedown -> setBreaksEnabled ( $ this -> kirby -> options [ 'markdown.breaks' ] ) ; return $ parsedown -> text ( $ markdown ) ; } }
Initializes the Parsedown parser and
 transforms the given markdown to HTML
Initializes the Parsedown parser and transforms the given markdown to HTML
// initialize the right markdown class // set markdown auto-breaks // parse it!