Addes links and images as well as url markers.

This trait conflicts with the HtmlTrait. If both are used together,
you have to define a resolution, by defining the HtmlTrait::parseInlineHtml
as private so it is not used directly:

use block\HtmlTrait {
    parseInlineHtml as private parseInlineHtml;
}

If the method exists it is called internally by this trait.

Also make sure to reset references on prepare():

protected function prepare()
{
    // reset references
    $this->references = [];
}
AbstractTrait
Properties
protected $references
 


  • var array a list of defined references in this document.
Methods
protected consumeReference( $lines, $current)
 
Consume link references

protected identifyReference( $line)
protected lookupReference( $key)
protected parseImage( $markdown)
 
Parses an image indicated by `![`.

  • marker ![
protected abstract parseInline( $text)
protected parseLink( $markdown)
protected parseLinkOrImage( $markdown)
protected parseLt( $text)
 
Parses inline HTML.

  • marker <
protected abstract renderAbsy( $blocks)
protected renderEmail( $block)
protected renderImage( $block)
protected renderLink( $block)
protected renderUrl( $block)
protected replaceEscape( $text)
 
Remove backslash from escaped characters

  • return string
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only