PHP Markdown & Extra

Overview

PHP Markdown & Extra

An updated and stripped version of the original PHP Markdown by Michel Fortin. Works quite well with PSR-0 autoloaders and is Composer friendly.

This Project Has Been Deprecated

Thank you for your interest in contributing to this package. Unfortunately, I do not plan to continue maintaining this package.

The original purpose of this package was to provide a way to get a PSR-0 and Composer friendly port of Michel Fortin's PHP Markdown library on Packagist. Michel was originally uninterested in Composer and did not want to make changes and said I was free to fork and maintain a special Composer package.

In January of 2013 (or around then) Michel finally joined the Composer bandwagon. More details can be found here. This means that the major reason this port existed (to be a Composer friendly port) effectively went away. This corresponded with the 1.3 release of PHP Markdown.

Additionally, other versions of PHP Markdown parsers have come into existence and are quite nice.

Please feel free to continue to use it as-is but if you are starting a new project I would recommend finding another library. If you have a project already depending on this package, I would recommend planning to migrate to something that is better maintained.

Thanks for your support and using this library over the years.


Changes from the official PHP Markdown & Extra

The initial pass at updating PHP Markdown & Extra left the core of the code more or less intact but the changes to the organization and naming were quite substantial. This effectively makes this package a hard fork from Markdown 1.0.1n and MarkdownExtra 1.2.4.

Updated in the following ways:

  • Moved parser classes into their own files
  • Using PHP 5.3 namespaces
  • Following PSR-0 standards
  • Replaced @define configuration variables with class const variables
  • Integrated with Travis CI
  • Made Composer friendly

Stripped in the following ways:

  • No more embedded plugin code (WordPress, bBlog, etc.)
  • No more top level function calls (Markdown(), etc.)

Last synced with:

  • PHP Markdown v1.0.1o
  • PHP Markdown Extra v1.2.5

Requirements

  • PHP 5.3+

Installation

To add this package as a local, per-project dependency to your project, simply add a dependency on dflydev/markdown to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on version 1.0 of this package:

{
    "require": {
        "dflydev/markdown": "1.0.*"
    }
}

Usage

Simple usage for the standard Markdown (details) parser:

Hello World
$markdownParser->transformMarkdown("#Hello World");

Simple usage for the Markdown Extra (details) parser:

Hello World
$markdownParser->transformMarkdown("#Hello World");

License

This library is licensed under the New BSD License - see the LICENSE file for details.

Community

If you have questions or want to help out, join us in the #dflydev channel on irc.freenode.net.

Not Invented Here

The original PHP Markdown was quite excellent but was not as easy to use as it could be in more modern PHP applications. Having started to use Composer for a few newer applications that needed to transform Markdown, I decided to strip and update the original PHP Markdown so that it could be more easily managed by the likes of Composer.

All of the initial work done for this library (which I can only assume was quite substantial after having looked at the code) was done by Michel Fortin during the original port from Perl to PHP.

If you do not need to install PHP Markdown by way of Composer or need to leverage PSR-0 autoloading, I suggest you continue to use the official and likely more stable and well used original version of PHP Markdown

You might also like...
Easily add routes to your Laravel app by creating Markdown or Blade files

Laravel Pages This package lets you create pages using Markdown or Blade without having to worry about creating routes or controllers yourself. Essent

Render colored  Markdown contents on console terminal
Render colored Markdown contents on console terminal

cli-markdown Render colored markdown contents on console terminal Preview run demo by php example/demo.php Features support auto render color on termi

Generate pseudo-static pages from markdown and HTML files for Flarum

Flarum Pages Generator This is not a Flarum extension. This package provides a Flarum extender that you can use in the local extend.php to define cust

markdown wiki/blog
markdown wiki/blog

Kwiki markdown wiki/blog Usage Place your markdown files in the /wiki directory. Categories are directories and subcategories are subdirectories. If y

Symfony 5 bundle to easily create dynamic subpages with Markdown. Useful for help sections and wikis.

MarkdownWikiBundle This bundle allows you to create rich subpages in a Symfony project using Markdown. Pages are stored in a file cache and sourced fr

Gruik ! An open-source markdown note-taking web app. [ABANDONED PROJECT]

What is Gruik ? It's a free & open-source note-taking service. A space where you can store notes, tutorials, code snippets... by writing them in markd

Docbook Tool for static documentation generation from Markdown files

Roave Docbook Tool Static HTML and PDF generator tool for generating documentation from Markdown files. Generates a deployable HTML file from Markdown

PHP Documentation system.

PHP Documentation system Simple but powerful Markdown docs. Features Search within Markdown files Customizable Twig templates (Note: default design is

Parser for Markdown and Markdown Extra derived from the original Markdown.pl by John Gruber.

PHP Markdown PHP Markdown Lib 1.9.0 - 1 Dec 2019 by Michel Fortin https://michelf.ca/ based on Markdown by John Gruber https://daringfireball.net/ Int

PHP Markdown & Extra

PHP Markdown & Extra An updated and stripped version of the original PHP Markdown by Michel Fortin. Works quite well with PSR-0 autoloaders and is Com

A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.
A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

PHP CLI tool which allows publishing zipped MODX extra to modstore.pro marketplace

MODX Extra Publisher PHP CLI tool which allows publishing zipped MODX extra to modstore.pro marketplace. Installation global? local? To install packag

Tentative Extra Data Structures for php

Teds Introduction Teds is a another collection of data structures. (Tentative Extra Data Structures) Installation This extension requires php 8.0 or n

A simple PHP MVC framework without extra files and codes that you don't need

Welcome to (SPM) Simple PHP MVC, just what you need! This is a simple PHP MVC framework without extra files and codes that you don't need.

FruityWiFi is a wireless network auditing tool. The application can be installed in any Debian based system (Jessie) adding the extra packages. Tested in Debian, Kali Linux, Kali Linux ARM (Raspberry Pi), Raspbian (Raspberry Pi), Pwnpi (Raspberry Pi), Bugtraq, NetHunter.
A drop-in library for certain database functionality in Laravel, that allows for extra features that may never make it into the main project.

Eloquence Eloquence is a package to extend Laravel's base Eloquent models and functionality. It provides a number of utilities and classes to work wit

Library extra fields for Laravel Orchid Platform
Library extra fields for Laravel Orchid Platform

Orchid Fields Extra library which add different fields in Laravel Orchid Platform Installation You may install into your project using the Composer pa

Extra RedBean ORM

RedBeanPHP 5 RedBeanPHP is an easy to use ORM tool for PHP. Automatically creates tables and columns as you go No configuration, just fire and forget

Updated project with extra Features like WISHLIST, List Orders, add Reviews, updated routing, resolved search bug is available for Premium

Updated project with extra Features like WISHLIST, List Orders, add Reviews, updated routing, resolved search bug is available for Premium Projects We

Comments
  • Refactoring and coding improvement

    Refactoring and coding improvement

    • better compliance with PSR-0 and PSR-1 accepted guidelines.
    • installation of PDC
    • better testing through PHPUnit fixtures and abstract parser testing
    • test fixes in commit 90c3e2b035c460ff329b28a5216a3aeb21a41c4a
    opened by mauris 12
  • [Request] Add support for fenced code block class and id names

    [Request] Add support for fenced code block class and id names

    Michel's library supports class and id names. Can this package be updated so it supports this as well?

    The feature: http://michelf.ca/projects/php-markdown/extra/#fenced-code-blocks

    Probably needs this code: https://github.com/michelf/php-markdown/blob/lib/Michelf/Markdown.php#L2756-L2819

    Thanks for having a look!

    opened by driesvints 0
Owner
dflydev
I'm Dragonfly Development (aka dflydev), a technology strategy consultancy created by Beau Simensen (@simensen). I also host Beau's public open-source projects.
dflydev
Better Markdown Parser in PHP

Parsedown Better Markdown Parser in PHP - Demo. Features One File No Dependencies Super Fast Extensible GitHub flavored Tested in 5.3 to 7.3 Markdown

Emanuil Rusev 14.3k Dec 28, 2022
Highly-extensible PHP Markdown parser which fully supports the CommonMark and GFM specs.

league/commonmark league/commonmark is a highly-extensible PHP Markdown parser created by Colin O'Dell which supports the full CommonMark spec and Git

The League of Extraordinary Packages 2.4k Dec 29, 2022
Convert HTML to Markdown with PHP

HTML To Markdown for PHP Library which converts HTML to Markdown for your sanity and convenience. Requires: PHP 7.2+ Lead Developer: @colinodell Origi

The League of Extraordinary Packages 1.5k Jan 3, 2023
A PHP tool to generate templateable markdown documentation from the docblocks or type-hints of your codebase.

Roster Installation To install, simply require the package using composer: composer require

Jordan LeDoux 14 Sep 25, 2022
PHP Markdown Engine Support

PHP Markdown Version v1.x support all PHP version >=5.4 v2.x support all PHP version >=7.0 Cài đặt thư viện Thư viện này được cài đặt thông qua Compos

Hung Nguyen 3 Jul 1, 2022
Rendering markdown from PHP code

JBZoo / Markdown Installing composer require jbzoo/markdown Usage Rendering Table <?php declare(strict_types=1); use JBZoo\Markdown\Table; echo (new

JBZoo Toolbox 1 Dec 26, 2021
A simple regex-based Markdown parser in PHP

Slimdown A simple regex-based Markdown parser in PHP. Supports the following elements (and can be extended via Slimdown::add_rule()): Headers Links Bo

Aband*nthecar 16 Dec 24, 2022
A super lightweight Markdown parser for PHP projects and applications.

A speedy Markdown parser for PHP applications. This is a super lightweight Markdown parser for PHP projects and applications. It has a rather verbose

Ryan Chandler 15 Nov 8, 2022
PHP based Markdown documentation viewer

PHP based viewer for Markdown files, to view them with fenced code highlighting and navigation.

null 5 Dec 9, 2022
A highly configurable markdown renderer and Blade component for Laravel

A highly configurable markdown renderer and Blade component for Laravel This package contains: a Blade component that can render markdown a highly con

Spatie 230 Jan 7, 2023