Introduction

This is a library package that includes the PHP Markdown Next parser, which is based on PHP Markdown Extra and PHP Markdown Extra Extended parsers.

Markdown is a text-to-HTML conversion tool for web writers.
Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

"Markdown" is two things: a plain text markup syntax, and a software tool, written in Perl, that converts the plain text markup to HTML.
PHP Markdown is a port to PHP of the original Markdown program by John Gruber.

Public API and Versioning Policy

Version numbers are of the form major.minor.patch.

The public API of PHP Markdown Next consist of the parser class MarkdownNext, its constructor, the transform and defaultTransform methods and their
configuration variables. The public API is stable for a given major version number.
It might get additions when the minor version number increments.

Protected members are not considered public API. This is unconventional and deserves an explanation.
Incrementing the major version number every time the underlying implementation of something changes is going to give nonessential version numbers
for the vast majority of people who just use the parser.
Protected members are meant to create parser subclasses that behave in different ways. Very few people create parser subclasses.
I don't want to discourage it by making everything private, but at the same time I can't guarantee any stable hook between versions if you use protected members.

Syntax changes will increment the minor number for new features, and the patch number for small corrections.
A new feature is something that needs a change in the syntax documentation.

Bugs and Contributions

Reporting of issues and creating of pull requests are highly appreciated!

Please include with your bug report: (1) the example of input; (2) the output you expected; (3) the output PHP Markdown Next actually produced.

Versions History

PHP Markdown Next 2.0.0 (10 Nov 2013):

This is first release of Next series.

Git version of PHP Markdown repository on 4 Nov 2013 was taken as the base

Code reformatted, some properties renamed, added proper PHPDoc sections so that IDE now can work with them

Several rejected pull requests of PHP Markdown Extra were added:

GFM-Style Fenced Code Blocks by Jason Caldwell

Enhanced ordered list by Matt Gorle

Convert public member comments to PHPDoc format (partial work in this direction) by Mark Trapp

Added changes from PHP Markdown Extra Extended, which was based on old version of PHP Markdown Extra

Markdown and MarkdownExtra classes together with other changes merged into single class MarkdownNext

Some internal changes, like moving of protected methods to closures in callbacks, short array syntax usage, short ternary operators

PHP Markdown Lib 1.3 (11 Apr 2013):

This is the first release of PHP Markdown Lib. This package requires PHP
version 4.3 or later and is designed to work with PSR-0 autoloading and,
optionally with Composer. Here is a list of the changes since
PHP Markdown Extra 1.2.6: