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
Table of Contents
Interfaces
- MarkdownPreProcessorContract
- Process Markdown before it is converted to HTML.
- MarkdownPostProcessorContract
- Process Markdown after it is converted to HTML.
Properties
Methods
- __construct() : mixed
- get() : string
- postprocess() : string
- preprocess() : string
- render() : string
- run() : static
- lineStartsWithDirective() : bool
- processLine() : string
Properties
$html
protected
string
$html
$output
protected
string
$output
$pageData
protected
array<string|int, mixed>
$pageData
= []
Methods
__construct()
public
__construct(string $html[, array<string|int, mixed>|null $pageData = [] ]) : mixed
Parameters
- $html : string
- $pageData : array<string|int, mixed>|null = []
get()
public
get() : string
Return values
stringpostprocess()
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
stringrun()
public
run() : static
Return values
staticlineStartsWithDirective()
protected
lineStartsWithDirective(string $line) : bool
Parameters
- $line : string
Return values
boolprocessLine()
protected
processLine(string $line) : string
Parameters
- $line : string