Download the PHP package kaoken/markdown-it-php without Composer
On this page you can find all versions of the php package kaoken/markdown-it-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kaoken/markdown-it-php
More information about kaoken/markdown-it-php
Files in kaoken/markdown-it-php
Package markdown-it-php
Short Description PHP version makdown-it
License MIT
Informations about the package markdown-it-php
markdown-it-php
This gem is a port of the markdown-it Javascript package by Vitaly Puzrin and Alex Kocharin. Currently synced with markdown-it 14.1.0
- Follows the CommonMark spec + adds syntax extensions & sugar (URL autolinking, typographer).
- Configurable syntax! You can add new rules and even replace existing ones.
- Safe by default.
Table of content
- Install
- Syntax extensions
- References / Thanks
- License
Install
composer:
Simple
Single line rendering, without paragraph wrap:
Init with presets and options
(*) presets define combinations of active rules and options. Can be
"commonmark"
, "zero"
or "default"
(if skipped).
Plugins load
Syntax highlighting
Apply syntax highlighting to fenced code blocks with the highlight
option:
The sample here is only the highlight of the PHP language.
Or with full wrapper override (if you need assign class to <pre>
):
Linkify
linkify: true
uses linkify-it. To
configure linkify-it, access the linkify instance through $md->linkify
:
Syntax extensions
Embedded (enabled by default):
- Tables (GFM)
- Strikethrough (GFM)
The following plugins are in the kaoken\markdown-it-php\MarkdownIt\Plugins directory:
- subscript
\MarkdownItSub
- superscript
\MarkdownItSup
- footnote
\MarkdownItFootnote
- definition list
\MarkdownItDeflist
- abbreviation
\MarkdownItAbbr
- emoji
\MarkdownItEmoji
- custom container
\MarkdownItContainer
- insert
\MarkdownItIns
- mark
\MarkdownItMark
Manage rules
By default all rules are enabled, but can be restricted by options. On plugin load all its rules are enabled automatically.
You can find all rules in sources: ParserBlock, ParserInline.
References / Thanks
Thanks to the authors of the original implementation in Javascript, markdown-it:
- Alex Kocharin github/rlidwka
- Vitaly Puzrin github/puzrin
and to John MacFarlane for his work on the CommonMark spec and reference implementations.
Related Links:
- https://github.com/jgm/CommonMark - reference CommonMark implementations in C & JS, also contains latest spec & online demo.
- http://talk.commonmark.org - CommonMark forum, good place to collaborate developers' efforts.
License
All versions of markdown-it-php with dependencies
ext-mbstring Version *
ext-json Version *