PHP Class MarkdownVanilla, vanilla

This class extends the Markdown vendor library to add some optional customizations to the rendering process.
Since: 2.2
Author: Tim Gunter ([email protected])
Inheritance: extends Michelf\MarkdownExtra
Show file Open project: vanilla/vanilla Class Usage Examples

Public Methods

Method Description
addAllFlavor ( ) : void Add all Vanilla customizations to markdown parsing
addBreaks ( ) : void Add soft breaks to markdown parsing
addListFix ( ) : void Don't require a newline for unordered lists to be recognized.
addSpoilers ( ) : void Add spoilers to markdown parsing
addStrikeout ( ) : void Add strikeouts to markdown parsing

Protected Methods

Method Description
_doSoftBreaks_callback ( $matches )
_doSpoilers_callback ( $matches )
_doSpoilers_callback2 ( $matches )
_doStrikeout_callback ( $matches )
doListFix ( string $text ) : string Work around php-markdown's non-standard implementation of lists.
doSoftBreaks ( string $text ) : string Add soft line breaks implementation (2 methods).
doSpoilers ( string $text ) : string Add Spoilers implementation (3 methods).
doStrikeout ( string $text ) : string Add Strikeout implementation (2 methods).

Method Details

_doSoftBreaks_callback() protected method

protected _doSoftBreaks_callback ( $matches )

_doSpoilers_callback() protected method

protected _doSpoilers_callback ( $matches )

_doSpoilers_callback2() protected method

protected _doSpoilers_callback2 ( $matches )

_doStrikeout_callback() protected method

protected _doStrikeout_callback ( $matches )

addAllFlavor() public method

Add all Vanilla customizations to markdown parsing
public addAllFlavor ( ) : void
return void

addBreaks() public method

Add soft breaks to markdown parsing
public addBreaks ( ) : void
return void

addListFix() public method

Don't require a newline for unordered lists to be recognized.
public addListFix ( ) : void
return void

addSpoilers() public method

Add spoilers to markdown parsing
public addSpoilers ( ) : void
return void

addStrikeout() public method

Add strikeouts to markdown parsing
public addStrikeout ( ) : void
return void

doListFix() protected method

Allows starting unordered lists without a newline.
protected doListFix ( string $text ) : string
$text string
return string

doSoftBreaks() protected method

Add soft line breaks implementation (2 methods).
protected doSoftBreaks ( string $text ) : string
$text string
return string

doSpoilers() protected method

Add Spoilers implementation (3 methods).
protected doSpoilers ( string $text ) : string
$text string
return string

doStrikeout() protected method

Add Strikeout implementation (2 methods).
protected doStrikeout ( string $text ) : string
$text string
return string