Pepperminty Wiki Module API

PeppermintParsedown extends ParsedownExtra
in package

The Peppermint-flavoured Parsedown parser.

Table of Contents

version  = '1.6.0'
__construct()  : mixed
Creates a new Peppermint Parsedown instance.
extract_page_names()  : array<string|int, mixed>
Extracts the page names from internal links in a given markdown source.
instance()  : mixed
line()  : mixed
parse()  : mixed
setBreaksEnabled()  : mixed
setInternalLinkBase()  : mixed
Sets the base url to be used for internal links. '%s' will be replaced with a URL encoded version of the page name.
setMarkupEscaped()  : mixed
setUrlsLinked()  : mixed
text()  : mixed

Constants

Methods

__construct()

Creates a new Peppermint Parsedown instance.

public __construct() : mixed
Return values
mixed

extract_page_names()

Extracts the page names from internal links in a given markdown source.

public static extract_page_names(string $page_text) : array<string|int, mixed>

Does not actually parse the source - only extracts via a regex.

Parameters
$page_text : string

The source text to extract a list of page names from.

Return values
array<string|int, mixed>

A list of page names that the given source text links to.

instance()

public static instance([mixed $name = 'default' ]) : mixed
Parameters
$name : mixed = 'default'
Return values
mixed

line()

public line(mixed $text) : mixed
Parameters
$text : mixed
Return values
mixed

parse()

public parse(mixed $text) : mixed
Parameters
$text : mixed
Return values
mixed

setBreaksEnabled()

public setBreaksEnabled(mixed $breaksEnabled) : mixed
Parameters
$breaksEnabled : mixed
Return values
mixed

setInternalLinkBase()

Sets the base url to be used for internal links. '%s' will be replaced with a URL encoded version of the page name.

public setInternalLinkBase(string $url) : mixed
Parameters
$url : string

The url to use when parsing internal links.

Return values
mixed

setMarkupEscaped()

public setMarkupEscaped(mixed $markupEscaped) : mixed
Parameters
$markupEscaped : mixed
Return values
mixed

setUrlsLinked()

public setUrlsLinked(mixed $urlsLinked) : mixed
Parameters
$urlsLinked : mixed
Return values
mixed

text()

public text(mixed $text) : mixed
Parameters
$text : mixed
Return values
mixed

Search results