diff --git a/README.md b/README.md index 91b090e..3f788f1 100644 --- a/README.md +++ b/README.md @@ -503,10 +503,12 @@ Markdown formatting is controlled by the following filters: The current default extensions are: - * [`League\CommonMark\Ext\Table\TableExtension`](https://github.com/thephpleague/commonmark-ext-table#syntax), which implements Markdown tables, - * [`Webuni\CommonMark\AttributesExtension\AttributesExtension`](https://github.com/webuni/commonmark-attributes-extension#syntax), which allows adding Kramdown-style HTML attributes to blocks and spans, and - * [`League\CommonMark\Ext\Strikethrough\StrikethroughExtension`](https://github.com/thephpleague/commonmark-ext-strikethrough/#readme), which turns `~~`-wrapped text into `` elements for strikethrough, and - * [`League\CommonMark\Ext\SmartPunct\SmartPunctExtension`](https://github.com/thephpleague/commonmark-ext-smartpunct#readme), which translates dots and hyphens to ellipses and em/en dashes, and converts plain single and double quotes to their left/right versions. + * [`League\CommonMark\Extension\Table\TableExtension`](https://commonmark.thephpleague.com/1.6/extensions/tables/#syntax), which implements Markdown tables, + * [`League\CommonMark\Extension\Attributes\AttributesExtension`](https://commonmark.thephpleague.com/1.6/extensions/attributes/#attribute-syntax), which allows adding Kramdown-style HTML attributes to blocks and spans, + * [`League\CommonMark\Extension\Strikethrough\StrikethroughExtension`](https://commonmark.thephpleague.com/1.6/extensions/strikethrough/), which turns `~~`-wrapped text into `` elements for strikethrough, + * [`League\CommonMark\Extension\SmartPunct\SmartPunctExtension`](https://commonmark.thephpleague.com/1.6/extensions/smart-punctuation/), which translates dots and hyphens to ellipses and em/en dashes, and converts plain single and double quotes to their left/right versions, + * [`League\CommonMark\Extension\Autolink\AutolinkExtension`](https://commonmark.thephpleague.com/1.6/extensions/autolinks/), which supports [Github-style autolinking](https://github.github.com/gfm/#autolinks-extension-) of bare URLs and web hostnames, + * [`League\CommonMark\Extension\TaskList\TaskListExtension`](https://commonmark.thephpleague.com/1.6/extensions/task-lists/), which adds support for [Github-style task lists](https://github.github.com/gfm/#task-list-items-extension-), * `dirtsimple\Postmark\ShortcodeParser`, which detects lines that consist solely of shortcode opening or closing tags, and passes them through without markdown interpretation. (This allows you to enclose markdown blocks within a shortcode, instead of having the shortcode become part of the block itself, which can be problematic when using e.g. conditional tags.) * `apply_filters('postmark_markdown', string $markdown, Document $doc, $fieldName)` -- this filter can alter the markdown content of a document (or any of its front-matter fields) before it's converted into HTML. `$fieldName` is `"body"` if `$markdown` came from `$doc->body`; otherwise it is the name of the front matter field being converted. (Such as `"Excerpt"`, or any custom fields added by plugins.) diff --git a/composer.json b/composer.json index a1d0f2a..c604bff 100644 --- a/composer.json +++ b/composer.json @@ -33,16 +33,12 @@ "require": { "dirtsimple/clean-yaml": "^0.1", "dirtsimple/imposer": "dev-master", - "wp-cli/wp-cli": "^2", - "wp-cli/entity-command": "^2", + "wp-cli/wp-cli": "^2.11", + "wp-cli/entity-command": "^2.8", "rarst/wpdatetime": "^0.3.0", - "league/commonmark": "^1.0", - "league/commonmark-ext-smartpunct": "^1.1", - "league/commonmark-ext-strikethrough": "^1.0", - "league/commonmark-ext-table": "^2.1", - "webuni/commonmark-attributes-extension": "^1.0", + "league/commonmark": "^1.6", "twig/twig": "^2.4", "symfony/yaml": "^3.4", - "php": "^7.1" + "php": ">=7.1" } } diff --git a/src/Formatter.php b/src/Formatter.php index 6e04cc5..452ce62 100644 --- a/src/Formatter.php +++ b/src/Formatter.php @@ -27,10 +27,12 @@ protected static function formatter() { 'line_break' => "", ), 'extensions' => array( - 'League\CommonMark\Ext\Table\TableExtension' => null, - 'Webuni\CommonMark\AttributesExtension\AttributesExtension' => null, - 'League\CommonMark\Ext\Strikethrough\StrikethroughExtension' => null, - 'League\CommonMark\Ext\SmartPunct\SmartPunctExtension' => null, + 'League\CommonMark\Extension\Autolink\AutolinkExtension' => null, + 'League\CommonMark\Extension\Table\TableExtension' => null, + 'League\CommonMark\Extension\TaskList\TaskListExtension' => null, + 'League\CommonMark\Extension\Attributes\AttributesExtension' => null, + 'League\CommonMark\Extension\Strikethrough\StrikethroughExtension' => null, + 'League\CommonMark\Extension\SmartPunct\SmartPunctExtension' => null, 'dirtsimple\Postmark\ShortcodeParser' => null, ), ); diff --git a/src/Option.php b/src/Option.php index 9a20370..74ef240 100644 --- a/src/Option.php +++ b/src/Option.php @@ -1,8 +1,8 @@