Heading


Usage

To generate a Markdown heading [h1...h6] you can set the heading size and content:

{info} If you didn't set the heading size, the default rendered size is h1

use BinaryTorch\PhpDown\Heading;

$heading = Heading::make('hello');

echo $heading->is1()->render();
echo $heading->is2()->render();
echo $heading->is3()->render();
echo $heading->is4()->render();
echo $heading->is5()->render();
echo $heading->is6()->render();

Output:

# hello
## hello
### hello
#### hello
##### hello
###### hello