roromedia/parsedown

一个具有超能力的parsedown服务。

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

This package is auto-updated.

Last update: 2024-09-28 12:16:31 UTC


README

这个库是在erusev/parsedown-extra之上的一层小层。

Scrutinizer Code Quality Code Coverage Total Downloads License

它目前增加了对以下内容的支持

安装

composer require roromedia/parsedown

使用方法

new Parsedown())->text('your Markdown here')

菜单链接

您可以在markdown页面上定义菜单链接。通常这些链接不会工作,因为这些ids缺失于相关的标题。

这个库解决了这个问题并连接它们。

例如

# Twig Query

A module for querying content inside TWIG-Templates

- [Installation](#installation)

# Installation

1. Install with composer:

... 转换为

<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>

如您所见 - <h1 id="installation">安装</h1> 有正确的 id 因此菜单列表再次工作。