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 5 years ago
Published by colinodell almost 5 years ago
Published by colinodell almost 5 years ago
Published by colinodell almost 5 years ago
Published by colinodell almost 5 years ago
Published by colinodell almost 5 years ago
Html5EntityDecoder
class (#387)Html5Entities
class - use Html5EntityDecoder
instead (#387)Published by colinodell over 5 years ago
First stable release! 🎉
No code changes have been introduced since 1.0.0-rc1
Published by colinodell over 5 years ago
ReferenceMapInterface
from the ReferenceMap
classReferenceMapInterface
parameter to the Document
constructorReferenceMap
with ReferenceMapInterface
ReferenceMap::addReference()
no longer returns $this
"0"
wouldn't be rendered (#376)Published by colinodell over 5 years ago
"0"
wouldn't be rendered (#376)Published by colinodell over 5 years ago
DocumentProcessorInterface
functionality in favor of event dispatching (#373)Published by colinodell over 5 years ago
Delimiter
class final and extracted a new DelimiterInterface
Delimiter
methods:
getOrigDelims()
renamed to getOriginalLength()
getNumDelims()
renamed to getLength()
setNumDelims()
renamed to setLength()
DelimiterStack
ReferenceMap
ReferenceParser
ReferenceParser
into the Reference
sub-namespaceDelimiter
methods:
setCanOpen()
setCanClose()
setChar()
setIndex()
setInlineNode()
Delimiter
(setter methods now have no return values)Published by colinodell over 5 years ago
This beta release fixes a couple of items that were not addressed in the previous beta.
DelimiterProcessorInterface::process()
will accept any type of AbstractStringContainer
now, not just Text
nodesDelimiter
constructor, getInlineNode()
, and setInlineNode()
no longer accept generic Node
elements - only AbstractStringContainer
ssafe
option (use html_input
and allow_unsafe_links
options instead)RegexHelper
constantsDocParser::getEnvironment()
(you should obtain it some other way)AbstractInlineContainer
(use AbstractInline
instead and make isContainer()
return true
)Published by colinodell over 5 years ago
See the upgrading guide for additional information.
addDelimiterProcessor()
added to ConfigurableEnvironmentInterface
and Environment
AdjacentTextMerger::mergeTextNodesBetweenExclusive()
CommonMarkConveter::getEnvironment()
Configuration::set()
DocParserInterface
created from DocParser
ConfigurationInterface
created from Configuration
ReferenceInterface
created from Reference
Configuration
class:
getConfig()
renamed to get()
mergeConfig()
renamed to merge()
setConfig()
renamed to replace()
ConfigurationAwareInterface::setConfiguration()
to accept the new ConfigurationInterface
instead of the concrete classAdjoiningTextCollapser
class to AdjacentTextMerger
collapseTextNodes()
method with the new mergeChildNodes()
methodfinal
:
Configuration
DocParser
HtmlRenderer
InlineParserEngine
NodeWalker
Reference
private
:
DelimiterStack::findEarliest()
protected
methods in InlineParserEngine
@internal
ElementRendererInterface
now requires a public renderInline()
method; added this to HtmlRenderer
InlineParserEngine::parse()
to require an AbstractStringContainerBlock
instead of the generic Node
classCommonmarkConverter::VERSION
constantConverter
constructor now requires an instance of DocParserInterface
instead of the concrete DocParser
Emphasis
, Strong
, and AbstractWebResource
to directly extend AbstractInline
instead of the (now-deprecated) intermediary AbstractInlineContainer
classNode
s without parentsNodeWalkerEvent
not requiring a Node
via its constructorReference::normalizeReference()
improperly converting to uppercase instead of performing proper Unicode case-foldingenable_strong
is set to false
(it now works identically to enable_em
)DocParser::getEnvironment()
(you should obtain it some other way)AbstractInlineContainer
(use AbstractInline
instead and make isContainer()
return true
)addInlineProcessor()
from ConfigurableEnvironmentInterface
and Environment
getInlineProcessors()
from EnvironmentInterface
and Environment
EmphasisProcessor
InlineProcessorInterface
EmphasisParser
now that we have proper delimiter supportgetEncoding()
from ContextInterface
getEncoding()
, setEncoding()
, and $encoding
from Context
getEncoding()
and the second $encoding
constructor param from Cursor
DelimiterStack::getTop()
(no replacement)DelimiterStack::iterateByCharacters()
(use the new processDelimiters()
method instead)DelimiterStack::findMatchingOpener()
methodPublished by colinodell over 5 years ago
Published by colinodell over 5 years ago
0.19.1 is an immediate follow-up to 0.19.0 which fixes issues with extensions that register other extensions.
(While this technically introduces a BC-break, it's allowed under SemVer's rules for 0.x releases and is necessary for 0.19.x code to work as expected.)
addExtension()
method to the new ConfigurableEnvironmentInterface
Published by colinodell over 5 years ago
The 50th release of league/commonmark
is here! 🎉
The Environment
and extension framework underwent some major changes in this release. Be sure to read the upgrade notes if you maintain any community extensions or have written custom functionality on top of this library.
add()
ing them; you no longer need to rely on the order in which they are addedEnvironment
:
EnvironmentInterface
ConfigurableEnvironmentInterface
AbstractStringContainerBlock
base class and corresponding StringContainerInterface
from AbstractBlock
Cursor::getEncoding()
method.phpstorm.meta.php
file for better IDE code completionHtmlElement
will now be escaped by defaultEnvironment
is now a final
classEnvironment::getBlockRendererForClass()
was replaced with Environment::getBlockRenderersForClass()
(note the added s
)Environment::getInlineRendererForClass()
was replaced with Environment::getInlineRenderersForClass()
(note the added s
)Environment::get____()
methods now return an iterator instead of an arrayContext::addBlock()
no longer returns the same block instance you passed into the method, as this served no useful purposeRegexHelper::isEscapable()
no longer accepts null
valuesNode::replaceChildren()
now accepts any type of iterable
, not just array
sAbstractStringContainerBlock
instead of AbstractBlock
InlineContainerInterface
now extends the new StringContainerInterface
handleRemainingContents()
method (formerly on AbstractBlock
, now on AbstractStringContainerBlock
) is now an `abstract methodInlineParserContext
constructor now requires an AbstractStringContainerBlock
instead of an AbstractBlock
add()
ing parsers with just the target block/inline class name - you need to include the full namespace nowEnvironment
:
getInlineParser($name)
getInlineParsers()
createInlineParserEngine()
getName()
methods:
AbstractBlockParser::getName()
AbstractInlineParser::getName()
BlockParserInterface::getName()
InlinerParserInterface::getName()
AbstractBlockParser
AbstractInlinerParser
InlineContainer
AbstractBlock::acceptsLines()
methodAbstractBlock
InlineContainer
classRegexHelper::$instance
RegexHelper::getInstance()
RegexHelper::getPartialRegex()
RegexHelper::getHtmlTagRegex()
RegexHelper::getLinkTitleRegex()
RegexHelper::getLinkDestinationBracesRegex()
RegexHelper::getThematicBreakRegex()
$preserveEntities
parameter from Xml:escape()
Published by colinodell over 5 years ago
Text
collapser not handling the full tree (thephpleague/commonmark-ext-autolink#10)Published by colinodell over 5 years ago
(
in parenthesized link titlePublished by colinodell over 5 years ago
This is a security update release.
$preserveEntites
argument of Xml::escape()
for removal in the next release (#353)Published by colinodell over 5 years ago
Text
elements not being collapsed after delimiter processingCommonmarkConverter::VERSION
constant for removal in 1.0.0