示例#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();
 }
示例#2
0
文件: test.php 项目: crit/markdown
<?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);
示例#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>