-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae0974a
commit 3f885fc
Showing
1 changed file
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
<?php | ||
//display error in runtime | ||
ini_set('display_errors','on'); | ||
error_reporting(E_ALL); | ||
//display error in runtime | ||
ini_set('display_errors','on'); | ||
error_reporting(E_ALL); | ||
require '../markdown.class.php'; | ||
header("Content-type: text/html; charset=utf-8"); | ||
$obj = new Markdown(); | ||
header("Content-type: text/html; charset=utf-8"); | ||
$obj = new Markdown(); | ||
|
||
$mdFile = 'markdown_document.md'; //orig | ||
$htmlFile = 'markdown_html.html'; | ||
$mdFile = 'markdown_document.md'; //orig | ||
$htmlFile = 'markdown_html.html'; | ||
|
||
$html2mdFile = 'html_2_md.md'; //parse | ||
$md2htmlFile = 'md_2_html.html'; | ||
$html2mdFile = 'html_2_md.md'; //parse | ||
$md2htmlFile = 'md_2_html.html'; | ||
|
||
$mdBackFile = 'markdown_back.md'; //parse and parse back | ||
$htmlBackFile = 'html_back.html'; | ||
$mdBackFile = 'markdown_back.md'; //parse and parse back | ||
$htmlBackFile = 'html_back.html'; | ||
|
||
$md = file_get_contents($mdFile); | ||
$md2html = $obj->parseMarkdown($md); | ||
file_put_contents($md2htmlFile, $md2html); //md => html | ||
$md = file_get_contents($mdFile); | ||
$md2html = $obj->parseMarkdown($md); | ||
file_put_contents($md2htmlFile, $md2html); //md => html | ||
|
||
$html = file_get_contents($htmlFile); | ||
$html2md = $obj->parseHtml($html); | ||
file_put_contents($html2mdFile, $html2md); //html => md | ||
$html = file_get_contents($htmlFile); | ||
$html2md = $obj->parseHtml($html); | ||
file_put_contents($html2mdFile, $html2md); //html => md | ||
|
||
$mdBack = $obj->parseHtml($md2html); | ||
file_put_contents($mdBackFile, $mdBack); //md => html => md | ||
$mdBack = $obj->parseHtml($md2html); | ||
file_put_contents($mdBackFile, $mdBack); //md => html => md | ||
|
||
$htmlBack = $obj->parseMarkdown($html2md); | ||
file_put_contents($htmlBackFile, $htmlBack); //html => md => html | ||
echo 'Done'; | ||
$htmlBack = $obj->parseMarkdown($html2md); | ||
file_put_contents($htmlBackFile, $htmlBack); //html => md => html | ||
echo 'Done'; | ||
|
||
//End_php |