Wallogit.com
2017 © Pedro Peláez
A PHP markdown parser, ported from marked. Built for speed.
A full-featured PHP markdown parser., (*1)
Ported from chjj/marked, consistent with previewing by JavaScript, (*2)
Support Github Flavoured Markdown, (*3)
Multiple underscores in words, (*4)
URL autolinking, (*5)
Strikethrough, (*6)
Fenced code blocks, (*7)
Tables, (*8)
High performance, (*9)
PHP 5.3+, (*10)
Composer, (*11)
composer require "breeswish/php-marked"
Minimal usage:, (*12)
echo \Breezewish\Marked\Marked::render('I am using __markdown__.');
// => <p>I am using <strong>markdown</strong>.</p>
Example setting options with default values:, (*13)
\Breezewish\Marked\Marked::setOptions(array(
'gfm' => true,
'tables' => true,
'breaks' => false,
'pedantic' => false,
'sanitize' => false,
'smartLists' => false,
'smartypants' => false,
'langPrefix' => 'lang-',
'xhtml' => false,
'headerPrefix' => '',
'highlight' => null,
'renderer' => new \Breezewish\Marked\Renderer()
));
echo \Breezewish\Marked\Marked::render('I am using __markdown__.');
Type: string, (*14)
String of markdown source to be compiled., (*15)
Type: array, (*16)
Hash of options. Can also be set using the Marked::setOptions method as seen above., (*17)
Type: boolean
Default: true, (*18)
Enable GitHub flavored markdown., (*19)
Type: boolean
Default: true, (*20)
Enable GFM tables.
This option requires the gfm option to be true., (*21)
Type: boolean
Default: false, (*22)
Enable GFM line breaks.
This option requires the gfm option to be true., (*23)
Type: boolean
Default: false, (*24)
Conform to obscure parts of markdown.pl as much as possible. Don't fix any of
the original markdown bugs or poor behavior., (*25)
Type: boolean
Default: false, (*26)
Sanitize the output. Ignore any HTML that has been input., (*27)
Type: boolean
Default: true, (*28)
Use smarter list behavior than the original markdown. May eventually be
default with the old behavior moved into pedantic., (*29)
Type: boolean
Default: false, (*30)
Use "smart" typograhic punctuation for things like quotes and dashes., (*31)
Type: string
Default: "lang-", (*32)
The prefix to be append in the className of <code>., (*33)
Type: boolean
Default: false, (*34)
Render XHTML., (*35)
Type: string
Default: "", (*36)
The prefix to be append in the id attribute of headers., (*37)
run phpunit., (*38)
The MIT License., (*39)