You are here

public function MarkdownExtra::__construct in Markdown 7

* Constructor function. Initialize the parser object. *

Return value

void

Overrides Markdown::__construct

File

includes/MarkdownExtra.php, line 84

Class

MarkdownExtra
Markdown Extra Parser Class

Namespace

Michelf

Code

public function __construct() {

  // Add extra escapable characters before parent constructor
  // initialize the table.
  $this->escape_chars .= ':|';

  // Insert extra document, block, and span transformations.
  // Parent constructor will do the sorting.
  $this->document_gamut += array(
    "doFencedCodeBlocks" => 5,
    "stripFootnotes" => 15,
    "stripAbbreviations" => 25,
    "appendFootnotes" => 50,
  );
  $this->block_gamut += array(
    "doFencedCodeBlocks" => 5,
    "doTables" => 15,
    "doDefLists" => 45,
  );
  $this->span_gamut += array(
    "doFootnotes" => 5,
    "doAbbreviations" => 70,
  );
  $this->enhanced_ordered_list = true;
  parent::__construct();
}