damcclean/metaparsedown-extra

This package is abandoned and no longer maintained. No replacement package was suggested.

Adds the ability to pharse YAML and Markdown extra. Powered by Parsedown Extra.

v1.0.0 2020-06-01 12:07 UTC

This package is auto-updated.

Last update: 2022-03-17 21:32:39 UTC


README

MetaPharsedown-extra extends erusev/parsedown, a markdown parser, by adding the ability to have metadata in markdown files in the form of valid yaml. MetaPharsedown uses the Symfony Yaml component to parse and extract the metadata.

This package is a fork on top of MetaParsedown, that uses Parsedown Extra instead of Parsedown.

All the methods in this package are the same as the standard MetaParsedown package.

Installation

composer require damcclean/metaparsedown-extra

Usage

$mp = new MetaParsedown();
$markdown = file_get_contents(....);
$html = $mp->text($markdown); // Return the html, without meta data
$meta = $mp->meta($markdown); // Return array of key/values and pairs
$bare = $mp->stripMeta($markdown); // Return markdown without yaml block

You can find more documentation on the original Parsedown-extra package.