mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
make parser class more extensible
This commit is contained in:
parent
4e670129c8
commit
5be4491943
2295
Parsedown.php
2295
Parsedown.php
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,7 @@ Include `Parsedown.php` or install [the composer package](https://packagist.org/
|
||||
### Example
|
||||
|
||||
``` php
|
||||
$parsedown = new Parsedown();
|
||||
$Parsedown = new Parsedown();
|
||||
|
||||
echo $parsedown->parse('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p>
|
||||
echo $Parsedown->text('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p>
|
||||
```
|
||||
|
@ -1,12 +1,8 @@
|
||||
<pre>
|
||||
<code><?php
|
||||
<pre><code><?php
|
||||
|
||||
$message = 'Hello World!';
|
||||
echo $message;</code>
|
||||
</pre>
|
||||
echo $message;</code></pre>
|
||||
<hr />
|
||||
<pre>
|
||||
<code>> not a quote
|
||||
<pre><code>> not a quote
|
||||
- not a list item
|
||||
[not a reference]: http://foo.com</code>
|
||||
</pre>
|
||||
[not a reference]: http://foo.com</code></pre>
|
@ -1,16 +1,12 @@
|
||||
<ul>
|
||||
<li>
|
||||
li
|
||||
<li>li
|
||||
<ul>
|
||||
<li>
|
||||
li
|
||||
<li>li
|
||||
<ul>
|
||||
<li>li</li>
|
||||
<li>li</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li>li</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li>li</li>
|
||||
</ul>
|
@ -1,6 +1,4 @@
|
||||
<p>escaped *emphasis*.</p>
|
||||
<p><code>escaped \*emphasis\* in a code span</code></p>
|
||||
<pre>
|
||||
<code>escaped \*emphasis\* in a code block</code>
|
||||
</pre>
|
||||
<pre><code>escaped \*emphasis\* in a code block</code></pre>
|
||||
<p>\ ` * _ { } [ ] ( ) > # + - . !</p>
|
@ -1,12 +1,6 @@
|
||||
<pre>
|
||||
<code><?php
|
||||
<pre><code><?php
|
||||
|
||||
$message = 'fenced code block';
|
||||
echo $message;</code>
|
||||
</pre>
|
||||
<pre>
|
||||
<code>tilde</code>
|
||||
</pre>
|
||||
<pre>
|
||||
<code class="language-php">echo 'language identifier';</code>
|
||||
</pre>
|
||||
echo $message;</code></pre>
|
||||
<pre><code>tilde</code></pre>
|
||||
<pre><code class="language-php">echo 'language identifier';</code></pre>
|
@ -1,8 +1,6 @@
|
||||
<pre>
|
||||
<code><?php
|
||||
<pre><code><?php
|
||||
|
||||
$message = 'Hello World!';
|
||||
echo $message;
|
||||
|
||||
echo "following a blank line";</code>
|
||||
</pre>
|
||||
echo "following a blank line";</code></pre>
|
@ -3,5 +3,6 @@
|
||||
<p>[one][404] with no definition</p>
|
||||
<p><a href="http://example.com">multiline
|
||||
one</a> defined on 2 lines</p>
|
||||
<p><a href="http://example.com">one</a> with an upper case label</p>
|
||||
<p><a href="http://example.com">one</a> with a mixed case label and an upper case definition</p>
|
||||
<p><a href="http://example.com">one</a> with the a label on the next line</p>
|
||||
<p><a href="http://example.com"><code>link</code></a></p>
|
@ -11,8 +11,11 @@
|
||||
[multiline
|
||||
one][website] defined on 2 lines
|
||||
|
||||
[one][label] with an upper case label
|
||||
[one][Label] with a mixed case label and an upper case definition
|
||||
|
||||
[LABEL]: http://example.com
|
||||
|
||||
[one]
|
||||
[1] with the a label on the next line
|
||||
|
||||
[`link`][website]
|
@ -1,3 +1 @@
|
||||
<pre>
|
||||
<code>code</code>
|
||||
</pre>
|
||||
<pre><code>code</code></pre>
|
Loading…
Reference in New Issue
Block a user