Markdown Extension for Parsedown
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Parsedown Extension

A markdown extension for parsedown , supports [TOC] syntax to generate table of contents.


Include both Parsedown.php and ParsedownExtension.php or install the composer package.


        $text = <<<EOL
# This is head 1
## This is head 1-1
### This is head 1-3
# Sample text of head 2
## Sample text of head 2-1

        $content = ParsedownExtension::instance()
	<li><a href="#This+is+head+1">This is head 1</a>
		<li><a href="#This+is+head+1-1">This is head 1-1</a>
			<li><a href="#This+is+head+1-3">This is head 1-3</a></li>
	<li><a href="#This+is+head+2">This is head 2</a>
		<li><a href="#This+is+head+2-1">This is head 2-1</a></li>
<h1 id="This+is+head+1">This is head 1</h1>
<h2 id="This+is+head+1-1">This is head 1-1</h2>
<h3 id="This+is+head+1-3">This is head 1-3</h3>
<h1 id="This+is+head+2">This is head 2</h1>
<h2 id="This+is+head+2-1">This is head 2-1</h2>

Reporting issues

You can create an issue