roromedia / parsedown
A parsedown service with superpowers.
v0.1.2
2022-07-25 12:46 UTC
Requires
- erusev/parsedown-extra: ^0.8.1
- symfony/string: ^6.0
Requires (Dev)
- phpunit/phpunit: ^9
- symfony/css-selector: ^6.0
- symfony/dom-crawler: ^6.0
README
This library is a small layer on top of erusev/parsedown-extra.
It currently adds support for:
Installation
composer require roromedia/parsedown
Usage
new Parsedown())->text('your Markdown here')
Menu links
You can define your Menu links on top of your markdown pages. Normally these links would not work because the ids are missing from the associated headings.
This library solves the problem and connects them.
As an example:
# Twig Query A module for querying content inside TWIG-Templates - [Installation](#installation) # Installation 1. Install with composer:
... gets converted to:
<h1>Twig Query</h1> <p>A module for querying content inside TWIG-Templates</p> <ul> <li><a href="#installation">Installation</a></li> </ul> <h1 id="installation">Installation</h1>
As you can see - <h1 id="installation">Installation</h1>
has the correct id
and therefore the menu list is working
again.