API Documentation

BladeDownProcessor
in package
implements MarkdownPreProcessorContract, MarkdownPostProcessorContract

Markdown Processor to render Laravel Blade within Markdown files.

Works on a line-by-line basis by searching for a line starting with the directive. The preprocessor expands the directive to an HTML comment. The post-processor parses it.

Tags
example:

[Blade]: {{ time() }}

example:
phpstan-consistent-constructor

Table of Contents

Interfaces

MarkdownPreProcessorContract
Process Markdown before it is converted to HTML.
MarkdownPostProcessorContract
Process Markdown after it is converted to HTML.

Properties

$html  : string
$output  : string
$pageData  : array<string|int, mixed>

Methods

__construct()  : mixed
get()  : string
postprocess()  : string
preprocess()  : string
render()  : string
run()  : static
lineStartsWithDirective()  : bool
processLine()  : string

Properties

Methods

__construct()

public __construct(string $html[, array<string|int, mixed>|null $pageData = [] ]) : mixed
Parameters
$html : string
$pageData : array<string|int, mixed>|null = []

postprocess()

public static postprocess(string $html[, array<string|int, mixed> $pageData = [] ]) : string
Parameters
$html : string

HTML to be processed

$pageData : array<string|int, mixed> = []
Return values
string

$html Processed HTML output

preprocess()

public static preprocess(string $markdown) : string
Parameters
$markdown : string

Markdown to be processed

Return values
string

$markdown Processed Markdown output

render()

public static render(string $html[, array<string|int, mixed> $pageData = [] ]) : string
Parameters
$html : string
$pageData : array<string|int, mixed> = []
Return values
string

lineStartsWithDirective()

protected lineStartsWithDirective(string $line) : bool
Parameters
$line : string
Return values
bool

processLine()

protected processLine(string $line) : string
Parameters
$line : string
Return values
string

        
On this page

Search results