Lines Matching refs:markdown

1 A super fast, highly extensible markdown parser for PHP
4 …able Version](https://poser.pugx.org/cebe/markdown/v/stable.png)](https://packagist.org/packages/c…
5 …al Downloads](https://poser.pugx.org/cebe/markdown/downloads.png)](https://packagist.org/packages/…
6 [![Build Status](https://travis-ci.org/cebe/markdown.svg?branch=master)](http://travis-ci.org/cebe/
7 …zer-ci.com/g/cebe/markdown/badges/coverage.png?s=db6af342d55bea649307ef311fbd536abb9bab76)](https:…
8 …r-ci.com/g/cebe/markdown/badges/quality-score.png?s=17448ca4d140429fd687c58ff747baeb6568d528)](htt…
14 for converting markdown files to HTML files.
21 markdown text to the expected output in HTML. This is possible without dealing with complex and err…
22 It is also possible to hook into the markdown structure and add elements or read meta information u…
25 Currently the following markdown flavors are supported:
27 …own** according to <http://daringfireball.net/projects/markdown/syntax> ([try it!](http://markdown
28 …ding to <https://help.github.com/articles/github-flavored-markdown> ([try it!](http://markdown.ceb…
29 …http://michelf.ca/projects/php-markdown/extra/> (currently not fully supported WIP see [#25][], [t…
35 - ... (Feel free to [suggest](https://github.com/cebe/markdown/issues/new) further additions!)
39 [#25]: https://github.com/cebe/markdown/issues/25 "issue #25"
55 The library uses PHPDoc annotations to determine the markdown elements that should be parsed.
61 composer require cebe/markdown "~1.2.0"
66 "cebe/markdown": "~1.2.0"
81 To parse your markdown you need only two lines of code. The first one is to choose the markdown fla…
84 - Traditional Markdown: `$parser = new \cebe\markdown\Markdown();`
85 - Github Flavored Markdown: `$parser = new \cebe\markdown\GithubMarkdown();`
86 - Markdown Extra: `$parser = new \cebe\markdown\MarkdownExtra();`
88 The next step is to call the `parse()`-method for parsing the text using the full markdown language
94 // traditional markdown and parse full text
95 $parser = new \cebe\markdown\Markdown();
96 echo $parser->parse($markdown);
98 // use github markdown
99 $parser = new \cebe\markdown\GithubMarkdown();
100 echo $parser->parse($markdown);
102 // use markdown extra
103 $parser = new \cebe\markdown\MarkdownExtra();
104 echo $parser->parse($markdown);
107 $parser = new \cebe\markdown\GithubMarkdown();
108 echo $parser->parseParagraph($markdown);
116 …istStartNumber = true` to enable keeping the numbers of ordered lists as specified in the markdown.
117 …fault behavior is to always start from 1 and increment by one regardless of the number in markdown.
129 bin/markdown README.md > README.html
131 Using github flavored markdown:
133 bin/markdown --flavor=gfm README.md > README.html
135 or convert the original markdown description to html using the unix pipe:
137 curl http://daringfireball.net/projects/markdown/syntax.text | bin/markdown > md.html
139 Here is the full Help output you will see when running `bin/markdown --help`:
147 bin/markdown [--flavor=<flavor>] [--full] [file.md]
149 …--flavor specifies the markdown flavor to use. If omitted the original markdown by John Gruber [1…
152 gfm - Github flavored markdown [2]
155 …--full ouput a full HTML page with head and body. If not given, only the parsed markdown will b…
163 Render a file with original markdown:
165 bin/markdown README.md > README.html
167 Render a file using gihtub flavored markdown:
169 bin/markdown --flavor=gfm README.md > README.html
171 Convert the original markdown description to html using STDIN:
173 curl http://daringfireball.net/projects/markdown/syntax.text | bin/markdown > md.html
176 [1] http://daringfireball.net/projects/markdown/syntax
177 [2] https://help.github.com/articles/github-flavored-markdown
178 [3] http://michelf.ca/projects/php-markdown/extra/
186 - [Bogardo/markdown-codepen](https://github.com/Bogardo/markdown-codepen) - shortcode to embed code…
187 - [kartik-v/yii2-markdown](https://github.com/kartik-v/yii2-markdown) - Advanced Markdown editing a…
188 - [cebe/markdown-latex](https://github.com/cebe/markdown-latex) - Convert Markdown to LaTeX and PDF
191 - ... [add yours!](https://github.com/cebe/markdown/edit/master/README.md#L186)
202 This markdown parser allows you to extend the markdown language by changing existing elements behav…
208 The markdown is parsed line by line to identify each non-empty line as one of the block element typ…
211 …e will implement support for [fenced code blocks][] which are part of the github flavored markdown.
213 [fenced code blocks]: https://help.github.com/articles/github-flavored-markdown#fenced-code-blocks
214 "Fenced code block feature of github flavored markdown"
219 class MyMarkdown extends \cebe\markdown\Markdown
243 …of the markdown document and the line number to parse next. In the abstract syntax array the first…
302 parsed from the input markdown. All text up to this offset will be removed from the markdown before…
304 As an example, we will add support for the [strikethrough][] feature of github flavored markdown:
306 …elp.github.com/articles/github-flavored-markdown#strikethrough "Strikethrough feature of github fl…
311 class MyMarkdown extends \cebe\markdown\Markdown
316 protected function parseStrike($markdown)
319 if (preg_match('/^~~(.+?)~~/', $markdown, $matches)) {
322 // other inline markdown elements inside this tag
342 This markdown library is composed of traits so it is very easy to create your own markdown flavor b…
357 If you want to define a subset of the markdown language, i.e. remove some of the features, you have…
424 using `\`. The following is the set of escapeable characters for traditional markdown, you can copy…
431 * as markdown.
469 ### Why another markdown parser?
471 While reviewing PHP markdown parsers for choosing one to use bundled with the [Yii framework 2.0][]
481 its own flavor (mainly github flavored markdown) in one class and at the time of this writing was
485 from Parsedown and making it extensible creating a class for each markdown flavor that extend each
486 other in the way that also the markdown languages extend each other.
487 This allows you to choose between markdown language flavors and also provides a way to compose your
500 Just [open an issue][] on github, post your markdown code and describe the problem. You may also at…
502 [open an issue]: https://github.com/cebe/markdown/issues/new
516 [license]: https://github.com/cebe/markdown/blob/master/LICENSE