roromedia/parsedown

A parsedown service with superpowers.

v0.1.2 2022-07-25 12:46 UTC

This package is auto-updated.

Last update: 2024-04-28 11:25:29 UTC


README

This library is a small layer on top of erusev/parsedown-extra.

Scrutinizer Code Quality Code Coverage Total Downloads License

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.