You are here

function MarkdownExtra_Parser::setup in Markdown 5

Same name and namespace in other branches
  1. 6 markdown.php \MarkdownExtra_Parser::setup()

Overrides Markdown_Parser::setup

File

./markdown.php, line 1697

Class

MarkdownExtra_Parser

Code

function setup() {

  #

  # Setting up Extra-specific variables.

  #
  parent::setup();
  $this->footnotes = array();
  $this->footnotes_ordered = array();
  $this->abbr_desciptions = array();
  $this->abbr_word_re = '';
  $this->footnote_counter = 1;
  foreach ($this->predef_abbr as $abbr_word => $abbr_desc) {
    if ($this->abbr_word_re) {
      $this->abbr_word_re .= '|';
    }
    $this->abbr_word_re .= preg_quote($abbr_word);
    $this->abbr_desciptions[$abbr_word] = trim($abbr_desc);
  }
}