Example #1
0
 protected function teardown()
 {
     #
     # Clearing Extra-specific variables.
     #
     $this->footnotes = array();
     $this->footnotes_ordered = array();
     $this->footnotes_ref_count = array();
     $this->footnotes_numbers = array();
     $this->abbr_desciptions = array();
     $this->abbr_word_re = '';
     parent::teardown();
 }
Example #2
0
<?php

include dirname(__DIR__) . "/vendor/autoload.php";
use Markdown\Markdown;
$html = Markdown::ToHTML("# Title\n\nParagraph 1\n\n- List Element 1\n- List Element 2\n\n");
$markdown = Markdown::FromHTML("<h1>Title</h1><p>Paragraph 1</p><ul><li>List Element 1</li><li>List Element 2</li></ul>");
print_r($html);
print_r($markdown);
Example #3
0
<?php

# Read file and pass content through the Markdown praser
$text = file_get_contents('Readme.md');
$html = \Markdown\Markdown::defaultTransform($text);
?>

<!DOCTYPE html>
<html>
<head>
    <title>PHP Markdown Lib - Readme</title>
</head>
<body>
<?php 
# Put HTML content in the document
echo $html;
?>
</body>
</html>