Constants

VERSION

VERSION

Properties

$empty_element_suffix

$empty_element_suffix : string

Change to ">" for HTML output.

Type

string

$tab_width

$tab_width : integer

Define the width of a tab for code blocks.

Type

integer

$no_markup

$no_markup : 

Change to `true` to disallow markup or entities.

Type

$no_entities

$no_entities : 

Type

$predef_urls

$predef_urls : 

Predefined urls and titles for reference links and images.

Type

$predef_titles

$predef_titles : 

Type

$list_level

$list_level : 

Type

$in_anchor

$in_anchor : boolean

Status flag to avoid invalid nesting.

Type

boolean

$urls

$urls : \Kaloa\Renderer\Markdown\type

Internal hashes used during transformation.

Type

\Kaloa\Renderer\Markdown\type

$titles

$titles : 

Type

Methods

transform()

transform(string  $text) : string

Main function. Performs some preprocessing on the input text and pass it through the document gamut.

Parameters

string $text

Returns

string

runBlockGamut()

runBlockGamut(string  $text) : string

Run block gamut tranformations.

These are all the transformations that form block-level tags like paragraphs, headers, and list items.

Parameters

string $text

Returns

string

runSpanGamut()

runSpanGamut(string  $text) : string

Run span gamut tranformations.

These are all the transformations that occur within block-level tags like paragraphs, headers, and list items.

Parameters

string $text

Returns

string

outdent()

outdent(string  $text) : string

Remove one level of line-leading tabs or spaces

Parameters

string $text

Returns

string

setup()

setup() 

Called before the transformation process starts to setup parser states.

teardown()

teardown() 

Called after the transformation process to clear any variable which may be taking up memory unnecessarly.

runBasicBlockGamut()

runBasicBlockGamut(string  $text) : string

Run block gamut tranformations, without hashing HTML blocks. This is useful when HTML blocks are known to be already hashed, like in the first whole-document pass.

Parameters

string $text

Returns

string