Highly-extensible PHP Markdown parser which fully supports the CommonMark and GFM specs.
BSD-3-CLAUSE License
Bot releases are visible (Hide)
Published by colinodell almost 6 years ago
This release contains an important security update for CVE-2018-20583.
Published by colinodell about 6 years ago
No breaking changes were introduced, but we did add a new interface: ConverterInterface
. Consider depending on this interface in your code instead of the concrete implementation. (See #330)
ConverterInterface
to Converter
and CommonMarkConverter
(#330)ListItem::getListData()
method (#329)target="_blank"
will also get rel="noopener noreferrer"
by default (#331)Published by colinodell over 6 years ago
Published by colinodell over 6 years ago
ListBlock::setTight()
methodPublished by colinodell over 6 years ago
Published by colinodell over 6 years ago
RegexHelper::isEscapable()
methodPublished by colinodell over 6 years ago
CommonMarkConverter::VERSION
(#314)Published by colinodell almost 7 years ago
This release contains several breaking changes and a minimum PHP version bump - see UPGRADE.md for more details.
max_nesting_level
setting (#243)Cursor
RegexHelper
are now defined as constants instead of being built on-the-fly.Cursor::saveState()
now returns an array
instead of a CursorState
object.Cursor::restoreState()
now accepts an array
parameter instead of a CursorState
object.RegexHelper
is now final
.InlineContainer
changed to new InlineContainerInterface
interface.MiscExtension::addInlineParser()
and MiscExtension::addBlockRenderer()
now return $this
instead of nothing.Reference::normalizeReference()
not properly collapsing whitespace to a single spaceRegexHelper::getInstance()
and all instance (non-static) methods have been deprecated.InlineContainer
interface has been deprecated. Use InlineContainerInterface
instead.CursorState
classCursor::getFirstNonSpacePosition()
Cursor::getFirstNonSpaceCharacter()
Cursor::advanceWhileMatches()
Cursor::advanceToFirstNonSpace()
ElementRendererInterface::escape()
HtmlRenderer::escape()
RegexHelper::REGEX_UNICODE_WHITESPACE
RegexHelper::getLinkDestinationRegex()
Published by colinodell almost 7 years ago
This release contains breaking changes, several performance improvements, and two deprecations:
Xml
utility class; moved HTML/XML escaping logic into there (see deprecations below)Environment::getInlineParsersForCharacter()
now returns an empty array (instead of null
) when no matching parsers are foundfinal
:
Html5Entities
LinkParserHelper
UrlEncoder
The following methods were deprecated and are scheduled for removal in 0.17.0 or 1.0.0 (whichever comes first). See UPGRADE.md for more information.
Cursor::advanceWhileMatches()
deprecated; use Cursor::match()
instead.HtmlRenderer::escape()
deprecated; use Xml::escape()
instead.DelimiterStack::findFirstMatchingOpener()
which was previously deprecated in 0.15.0Published by colinodell almost 7 years ago
Cursor::advanceBy()
(for a 16% performance boost!) 🎉Published by colinodell about 7 years ago
Published by colinodell about 7 years ago
This release bumps spec compliance to 0.28 without breaking changes to the API.
LinkParserHelper::parseLinkDestination()
to allow nested parens<pre>
(it shouldn't) and not matching <iframe>
(it should)]
charactersAn unused constant and static method were deprecated and will be removed in a future release. See <UPGRADE.md> for more information.
RegexHelper::REGEX_UNICODE_WHITESPACE
(no longer used)RegexHelper::getLinkDestinationRegex()
(no longer used)Published by colinodell over 7 years ago
Cursor
(#280):
advanceToNextNonSpaceOrNewline()
- Identical replacement for the (now-deprecated) advanceToFirstNonSpace()
methodadvanceToNextNonSpaceOrTab()
- Similar replacement for advanceToFirstNonSpace()
but with proper tab handlinggetNextNonSpaceCharacter()
- Identical replacement for the (now-deprecated) getFirstNonSpaceCharacter()
methodgetNextNonSpacePosition()
- Identical replacement for the (now-deprecated) getFirstNonSpacePosition()
methodCursorState
(#280):
getNextNonSpaceCache()
- Identical replacement for the (now-deprecated) getFirstNonSpaceCache()
methodAll deprecations listed here will be removed in a future 0.x release. See UPGRADE.md for instructions on preparing your code for the eventual removal of these methods.
Cursor::advanceToFirstNonSpace()
(#280)
advanceToNextNonSpaceOrTab()
or advanceToNextNonSpaceOrNewline()
instead, depending on your requirementsCursor::getFirstNonSpaceCharacter()
(#280)
Cursor::getNextNonSpaceCharacter()
insteadCursor::getFirstNonSpacePosition()
(#280)
Cursor::getNextNonSpacePosition()
insteadCursorState::getFirstNonSpaceCache()
(#280)
CursorState::getNextNonSpaceCache()
insteadPublished by colinodell almost 8 years ago
Published by colinodell almost 8 years ago
(
Published by colinodell almost 8 years ago
Published by colinodell about 8 years ago
CursorState
constructor requires an additional parameter (#258)1
(#260)DelimiterStack::findFirstMatchingOpener()
- use findMatchingOpener()
instead (#260)Cursor::advanceBy()
(#260)Published by colinodell over 8 years ago
safe
option is deprecated and replaced by 2 new options (#253, #255):
html_input
(strip
, allow
or escape
): how to handle untrusted HTML input (the default is strip
for BC reasons)allow_unsafe_links
(true
or false
): whether to allow risky image URLs and links (the default is true
for BC reasons)safe
option is now deprecated and will be removed in the 1.0.0 release.Published by colinodell over 8 years ago
autoload.php
within bin/commonmark (#250)Published by colinodell over 8 years ago
setUrl()
method for Link
and Image
elements (#227, #244)