2017 © Pedro Peláez
 

library commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

image

webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  • Monday, June 4, 2018
  • by hason
  • Repository
  • 3 Watchers
  • 24 Stars
  • 19,461 Installations
  • PHP
  • 13 Dependents
  • 0 Suggesters
  • 9 Forks
  • 2 Open issues
  • 9 Versions
  • 14 % Grown

The README.md

CommonMark Attributes Extension

Packagist Build Status Scrutinizer Code Quality Code Coverage, (*1)

The Attributes extension adds a syntax to define attributes on the various HTML elements in markdown’s output., (*2)

DEPRECATED

This extension has been deprecated. All of its functionality now exists in league/commonmark 1.5+ under the League\CommonMark\Extension\Attributes namespace, so you should upgrade to that version and use that bundled extension instead of this one., (*3)

Installation

This project can be installed via Composer:, (*4)

composer require webuni/commonmark-attributes-extension

Usage

use League\CommonMark\Converter;
use League\CommonMark\DocParser;
use League\CommonMark\Environment;
use League\CommonMark\HtmlRenderer;
use Webuni\CommonMark\AttributesExtension\AttributesExtension;

$environment = Environment::createCommonMarkEnvironment();
$environment->addExtension(new AttributesExtension());

$converter = new Converter(new DocParser($environment), new HtmlRenderer($environment));

echo $converter->convertToHtml('# Hello World!');

Syntax

The basic syntax was inspired by Kramdown‘s Attribute Lists feature., (*5)

You can assign any attribute to a block-level element. Just directly prepend or follow the block with a block inline attribute list. That consists of a left curly brace, optionally followed by a colon, the attribute definitions and a right curly brace:, (*6)

> A nice blockquote
{: title="Blockquote title"}

{#id .class}
## Header

As with a block-level element you can assign any attribute to a span-level elements using a span inline attribute list, that has the same syntax and must immediately follow the span-level element:, (*7)

This is *red*{style="color: red"}.

The Versions

04/06 2018

dev-master

9999999-dev https://github.com/webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoň

markdown attributes commonmark

26/09 2016

0.5.0

0.5.0.0 https://github.com/webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoň

markdown attributes commonmark

17/07 2016

0.4.0

0.4.0.0 https://github.com/webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoň

markdown attributes commonmark

15/01 2016

0.3.2

0.3.2.0 https://github.com/webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoň

markdown attributes commonmark

05/11 2015

0.3.1

0.3.1.0 https://github.com/webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoň

markdown attributes commonmark

26/09 2015

0.3.0

0.3.0.0 https://github.com/webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoň

markdown attributes commonmark

27/07 2015

0.2.0

0.2.0.0 https://github.com/webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoň

markdown attributes commonmark

13/07 2015

0.1.1

0.1.1.0 https://github.com/webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoň

markdown attributes commonmark

13/07 2015

0.1.0

0.1.0.0 https://github.com/webuni/commonmark-attributes-extension

The attributes extension adds a syntax to define attributes on the various HTML elements in CommonMark PHP implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoň

markdown attributes commonmark