Skip to content

1.1

No due date 0% complete
  • No BC break from 1.0.x
  • HTML attribute support
  • Textile support
{
    "require": {
        "kzykhys/ciconia": "1.1.*@dev"
    }
}

Textile

You can mix Textile syntax in your document

use Ciconia\Ciconia;
use Ciconia\Extension\Textile;

$ciconia = new Ciconia();
$ciconia->addExtension(new Textile\HeaderExtension());   // ! replaces Markdown-style headers
$c…
  • No BC break from 1.0.x
  • HTML attribute support
  • Textile support
{
    "require": {
        "kzykhys/ciconia": "1.1.*@dev"
    }
}

Textile

You can mix Textile syntax in your document

use Ciconia\Ciconia;
use Ciconia\Extension\Textile;

$ciconia = new Ciconia();
$ciconia->addExtension(new Textile\HeaderExtension());   // ! replaces Markdown-style headers
$ciconia->addExtension(new Textile\DefinitionListExtension());
$ciconia->addExtension(new Textile\CommentExtension());

$html = $ciconia->render('- HTML := HyperText Markup Language');

// <dl>
// <dt>HTML</dt>
// <dd>HyperText Markup Language</dd>
// </dl>

HTML Attributes

You can set HTML attributes for block elements

use Ciconia\Ciconia;
use Ciconia\Extension\Html;

$ciconia = new Ciconia();
$ciconia->addExtension(new Html\AttributesExtension());

$html = $ciconia->render('## Header {#main.red.bold[role="header" data-xxx="yyy"]}');

// <h1 id="main" class="red bold" role="header" data-xxx="yyy">Header</h2>

Example 1: <h3 id="header">Header</h3>

### {#id} Header

Example 2: <h3 id="header" class="class1 class2" attr1="value" attr2="value" att3="attr3">Header</h3>

### Header {#id.class1.class2[attr1=value attr2="value" attr3]}

Example 3: <p role="main">Paragraph</p>

{[role=main]} Paragraph
{[role=main]}
Paragraph
Paragraph {[role=main]}

Optional Pygments support

{
    "require": {
        "kzykhys/pygments": ">=1.0"
    }
}
use Ciconia\Ciconia;
use Ciconia\Extension\Gfm;

$ciconia = new Ciconia();
$ciconia->addExtension(new Gfm\FencedCodeBlockExtension());

$html = $ciconia->render($markdown, ['pygments' => true]);
``` php

```
Loading