This commit is contained in:
2020-10-06 14:27:47 +07:00
commit 586be80cf6
16613 changed files with 3274099 additions and 0 deletions

View File

@@ -0,0 +1,115 @@
<?php
/**
* @copyright Copyright (c) 2014 Carsten Brandt
* @license https://github.com/cebe/markdown/blob/master/LICENSE
* @link https://github.com/cebe/markdown#readme
*/
namespace cebe\markdown\tests;
use cebe\markdown\Parser;
/**
* Base class for all Test cases.
*
* @author Carsten Brandt <mail@cebe.cc>
*/
abstract class BaseMarkdownTest extends \PHPUnit_Framework_TestCase
{
protected $outputFileExtension = '.html';
abstract public function getDataPaths();
/**
* @return Parser
*/
abstract public function createMarkdown();
/**
* @dataProvider dataFiles
*/
public function testParse($path, $file)
{
list($markdown, $html) = $this->getTestData($path, $file);
// Different OS line endings should not affect test
$html = str_replace(["\r\n", "\n\r", "\r"], "\n", $html);
$m = $this->createMarkdown();
$this->assertEquals($html, $m->parse($markdown));
}
public function testUtf8()
{
$this->assertSame("<p>абвгдеёжзийклмнопрстуфхцчшщъыьэюя</p>\n", $this->createMarkdown()->parse('абвгдеёжзийклмнопрстуфхцчшщъыьэюя'));
$this->assertSame("<p>there is a charater, 配</p>\n", $this->createMarkdown()->parse('there is a charater, 配'));
$this->assertSame("<p>Arabic Latter \"م (M)\"</p>\n", $this->createMarkdown()->parse('Arabic Latter "م (M)"'));
$this->assertSame("<p>電腦</p>\n", $this->createMarkdown()->parse('電腦'));
$this->assertSame('абвгдеёжзийклмнопрстуфхцчшщъыьэюя', $this->createMarkdown()->parseParagraph('абвгдеёжзийклмнопрстуфхцчшщъыьэюя'));
$this->assertSame('there is a charater, 配', $this->createMarkdown()->parseParagraph('there is a charater, 配'));
$this->assertSame('Arabic Latter "م (M)"', $this->createMarkdown()->parseParagraph('Arabic Latter "م (M)"'));
$this->assertSame('電腦', $this->createMarkdown()->parseParagraph('電腦'));
}
public function testInvalidUtf8()
{
$m = $this->createMarkdown();
$this->assertEquals("<p><code><3E></code></p>\n", $m->parse("`\x80`"));
$this->assertEquals('<code><3E></code>', $m->parseParagraph("`\x80`"));
}
public function pregData()
{
// http://en.wikipedia.org/wiki/Newline#Representations
return [
["a\r\nb", "a\nb"],
["a\n\rb", "a\nb"], // Acorn BBC and RISC OS spooled text output :)
["a\nb", "a\nb"],
["a\rb", "a\nb"],
["a\n\nb", "a\n\nb", "a</p>\n<p>b"],
["a\r\rb", "a\n\nb", "a</p>\n<p>b"],
["a\n\r\n\rb", "a\n\nb", "a</p>\n<p>b"], // Acorn BBC and RISC OS spooled text output :)
["a\r\n\r\nb", "a\n\nb", "a</p>\n<p>b"],
];
}
/**
* @dataProvider pregData
*/
public function testPregReplaceR($input, $exptected, $pexpect = null)
{
$this->assertSame($exptected, $this->createMarkdown()->parseParagraph($input));
$this->assertSame($pexpect === null ? "<p>$exptected</p>\n" : "<p>$pexpect</p>\n", $this->createMarkdown()->parse($input));
}
public function getTestData($path, $file)
{
return [
file_get_contents($this->getDataPaths()[$path] . '/' . $file . '.md'),
file_get_contents($this->getDataPaths()[$path] . '/' . $file . $this->outputFileExtension),
];
}
public function dataFiles()
{
$files = [];
foreach ($this->getDataPaths() as $name => $src) {
$handle = opendir($src);
if ($handle === false) {
throw new \Exception('Unable to open directory: ' . $src);
}
while (($file = readdir($handle)) !== false) {
if ($file === '.' || $file === '..') {
continue;
}
if (substr($file, -3, 3) === '.md' && file_exists($src . '/' . substr($file, 0, -3) . $this->outputFileExtension)) {
$files[] = [$name, substr($file, 0, -3)];
}
}
closedir($handle);
}
return $files;
}
}

View File

@@ -0,0 +1,80 @@
<?php
/**
* @copyright Copyright (c) 2014 Carsten Brandt
* @license https://github.com/cebe/markdown/blob/master/LICENSE
* @link https://github.com/cebe/markdown#readme
*/
namespace cebe\markdown\tests;
use cebe\markdown\GithubMarkdown;
/**
* Test case for the github flavored markdown.
*
* @author Carsten Brandt <mail@cebe.cc>
* @group github
*/
class GithubMarkdownTest extends BaseMarkdownTest
{
public function createMarkdown()
{
return new GithubMarkdown();
}
public function getDataPaths()
{
return [
'markdown-data' => __DIR__ . '/markdown-data',
'github-data' => __DIR__ . '/github-data',
];
}
public function testNewlines()
{
$markdown = $this->createMarkdown();
$this->assertEquals("This is text<br />\nnewline\nnewline.", $markdown->parseParagraph("This is text \nnewline\nnewline."));
$markdown->enableNewlines = true;
$this->assertEquals("This is text<br />\nnewline<br />\nnewline.", $markdown->parseParagraph("This is text \nnewline\nnewline."));
$this->assertEquals("<p>This is text</p>\n<p>newline<br />\nnewline.</p>\n", $markdown->parse("This is text\n\nnewline\nnewline."));
}
public function dataFiles()
{
$files = parent::dataFiles();
foreach($files as $i => $f) {
// skip files that are different in github MD
if ($f[0] === 'markdown-data' && (
$f[1] === 'list-marker-in-paragraph' ||
$f[1] === 'dense-block-markers'
)) {
unset($files[$i]);
}
}
return $files;
}
public function testKeepZeroAlive()
{
$parser = $this->createMarkdown();
$this->assertEquals("0", $parser->parseParagraph("0"));
$this->assertEquals("<p>0</p>\n", $parser->parse("0"));
}
public function testAutoLinkLabelingWithEncodedUrl()
{
$parser = $this->createMarkdown();
$utfText = "\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a";
$utfNaturalUrl = "http://example.com/" . $utfText;
$utfEncodedUrl = "http://example.com/" . urlencode($utfText);
$eucEncodedUrl = "http://example.com/" . urlencode(mb_convert_encoding($utfText, 'EUC-JP', 'UTF-8'));
$this->assertStringEndsWith(">{$utfNaturalUrl}</a>", $parser->parseParagraph($utfNaturalUrl), "Natural UTF-8 URL needs no conversion.");
$this->assertStringEndsWith(">{$utfNaturalUrl}</a>", $parser->parseParagraph($utfEncodedUrl), "Encoded UTF-8 URL will be converted to readable format.");
$this->assertStringEndsWith(">{$eucEncodedUrl}</a>", $parser->parseParagraph($eucEncodedUrl), "Non UTF-8 URL should never be converted.");
// See: \cebe\markdown\inline\UrlLinkTrait::renderAutoUrl
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace cebe\markdown\tests;
use cebe\markdown\MarkdownExtra;
/**
* @author Carsten Brandt <mail@cebe.cc>
* @group extra
*/
class MarkdownExtraTest extends BaseMarkdownTest
{
public function createMarkdown()
{
return new MarkdownExtra();
}
public function getDataPaths()
{
return [
'markdown-data' => __DIR__ . '/markdown-data',
'extra-data' => __DIR__ . '/extra-data',
];
}
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* @copyright Copyright (c) 2014 Carsten Brandt
* @license https://github.com/cebe/markdown/blob/master/LICENSE
* @link https://github.com/cebe/markdown#readme
*/
namespace cebe\markdown\tests;
use cebe\markdown\Markdown;
/**
* Test support ordered lists at arbitrary number(`start` html attribute)
* @author Maxim Hodyrew <maximkou@gmail.com>
* @group default
*/
class MarkdownOLStartNumTest extends BaseMarkdownTest
{
public function createMarkdown()
{
$markdown = new Markdown();
$markdown->keepListStartNumber = true;
return $markdown;
}
public function getDataPaths()
{
return [
'markdown-data' => __DIR__ . '/markdown-ol-start-num-data',
];
}
}

View File

@@ -0,0 +1,60 @@
<?php
/**
* @copyright Copyright (c) 2014 Carsten Brandt
* @license https://github.com/cebe/markdown/blob/master/LICENSE
* @link https://github.com/cebe/markdown#readme
*/
namespace cebe\markdown\tests;
use cebe\markdown\Markdown;
/**
* Test case for traditional markdown.
*
* @author Carsten Brandt <mail@cebe.cc>
* @group default
*/
class MarkdownTest extends BaseMarkdownTest
{
public function createMarkdown()
{
return new Markdown();
}
public function getDataPaths()
{
return [
'markdown-data' => __DIR__ . '/markdown-data',
];
}
public function testEdgeCases()
{
$this->assertEquals("<p>&amp;</p>\n", $this->createMarkdown()->parse('&'));
$this->assertEquals("<p>&lt;</p>\n", $this->createMarkdown()->parse('<'));
}
public function testKeepZeroAlive()
{
$parser = $this->createMarkdown();
$this->assertEquals("0", $parser->parseParagraph("0"));
$this->assertEquals("<p>0</p>\n", $parser->parse("0"));
}
public function testAutoLinkLabelingWithEncodedUrl()
{
$parser = $this->createMarkdown();
$utfText = "\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a";
$utfNaturalUrl = "http://example.com/" . $utfText;
$utfEncodedUrl = "http://example.com/" . urlencode($utfText);
$eucEncodedUrl = "http://example.com/" . urlencode(mb_convert_encoding($utfText, 'EUC-JP', 'UTF-8'));
$this->assertStringEndsWith(">{$utfNaturalUrl}</a>", $parser->parseParagraph("<{$utfNaturalUrl}>"), "Natural UTF-8 URL needs no conversion.");
$this->assertStringEndsWith(">{$utfNaturalUrl}</a>", $parser->parseParagraph("<{$utfEncodedUrl}>"), "Encoded UTF-8 URL will be converted to readable format.");
$this->assertStringEndsWith(">{$eucEncodedUrl}</a>", $parser->parseParagraph("<{$eucEncodedUrl}>"), "Non UTF-8 URL should never be converted.");
// See: \cebe\markdown\inline\LinkTrait::renderUrl
}
}

View File

@@ -0,0 +1,94 @@
<?php
/**
* @copyright Copyright (c) 2014 Carsten Brandt
* @license https://github.com/cebe/markdown/blob/master/LICENSE
* @link https://github.com/cebe/markdown#readme
*/
namespace cebe\markdown\tests;
use cebe\markdown\Parser;
/**
* Test case for the parser base class.
*
* @author Carsten Brandt <mail@cebe.cc>
* @group default
*/
class ParserTest extends \PHPUnit_Framework_TestCase
{
public function testMarkerOrder()
{
$parser = new TestParser();
$parser->markers = [
'[' => 'parseMarkerA',
'[[' => 'parseMarkerB',
];
$this->assertEquals("<p>Result is A</p>\n", $parser->parse('Result is [abc]'));
$this->assertEquals("<p>Result is B</p>\n", $parser->parse('Result is [[abc]]'));
$this->assertEquals('Result is A', $parser->parseParagraph('Result is [abc]'));
$this->assertEquals('Result is B', $parser->parseParagraph('Result is [[abc]]'));
$parser = new TestParser();
$parser->markers = [
'[[' => 'parseMarkerB',
'[' => 'parseMarkerA',
];
$this->assertEquals("<p>Result is A</p>\n", $parser->parse('Result is [abc]'));
$this->assertEquals("<p>Result is B</p>\n", $parser->parse('Result is [[abc]]'));
$this->assertEquals('Result is A', $parser->parseParagraph('Result is [abc]'));
$this->assertEquals('Result is B', $parser->parseParagraph('Result is [[abc]]'));
}
public function testMaxNestingLevel()
{
$parser = new TestParser();
$parser->markers = [
'[' => 'parseMarkerC',
];
$parser->maximumNestingLevel = 3;
$this->assertEquals("(C-a(C-b(C-c)))", $parser->parseParagraph('[a[b[c]]]'));
$parser->maximumNestingLevel = 2;
$this->assertEquals("(C-a(C-b[c]))", $parser->parseParagraph('[a[b[c]]]'));
$parser->maximumNestingLevel = 1;
$this->assertEquals("(C-a[b[c]])", $parser->parseParagraph('[a[b[c]]]'));
}
public function testKeepZeroAlive()
{
$parser = new TestParser();
$this->assertEquals("0", $parser->parseParagraph("0"));
$this->assertEquals("<p>0</p>\n", $parser->parse("0"));
}
}
class TestParser extends Parser
{
public $markers = [];
protected function inlineMarkers()
{
return $this->markers;
}
protected function parseMarkerA($text)
{
return [['text', 'A'], strrpos($text, ']') + 1];
}
protected function parseMarkerB($text)
{
return [['text', 'B'], strrpos($text, ']') + 1];
}
protected function parseMarkerC($text)
{
$terminatingMarkerPos = strrpos($text, ']');
$inside = $this->parseInline(substr($text, 1, $terminatingMarkerPos - 1));
return [['text', '(C-' . $this->renderAbsy($inside) . ')'], $terminatingMarkerPos + 1];
}
}

View File

@@ -0,0 +1,5 @@
<?php
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
require(__DIR__ . '/../vendor/autoload.php');
}

View File

@@ -0,0 +1,17 @@
<pre><code>
fenced code block
</code></pre>
<pre><code>
fenced with tildes
</code></pre>
<pre><code>long fence
```
code about code
```
</code></pre>
<pre><code class="html" id="test">fenced code block
</code></pre>

View File

@@ -0,0 +1,24 @@
```
fenced code block
```
~~~
fenced with tildes
~~~
``````````
long fence
```
code about code
```
``````````
``` .html #test
fenced code block
```

View File

@@ -0,0 +1,12 @@
<h1 id="header1">Header 1</h1>
<h2 id="header2">Header 2</h2>
<h2 class="main">The Site</h2>
<h2 class="main shine" id="the-site">The Site</h2>
<p><a href="url" id="id1" class="class">link</a>
<img src="url" alt="img" id="id2" class="class" /></p>
<p><a href="http://url.de/" title="optional title" id="id" class="class">link</a> or <a href="http://url.de/" title="optional title" id="id" class="class">linkref</a>
<img src="http://url.de/" alt="img" title="optional title" id="id" class="class" /></p>
<p>this is just normal text {.main .shine #the-site}</p>
<p>some { brackets</p>
<p>some } brackets</p>
<p>some { } brackets</p>

View File

@@ -0,0 +1,25 @@
Header 1 {#header1}
========
## Header 2 ## {#header2}
## The Site ## {.main}
## The Site ## {.main .shine #the-site}
[link](url){#id1 .class}
![img](url){#id2 .class}
[link][linkref] or [linkref]
![img][linkref]
[linkref]: http://url.de/ "optional title" {#id .class}
this is just normal text {.main .shine #the-site}
some { brackets
some } brackets
some { } brackets

View File

@@ -0,0 +1,89 @@
<h2>Tables</h2>
<table>
<thead>
<tr><th>First Header </th><th>Second Header</th></tr>
</thead>
<tbody>
<tr><td>Content Cell </td><td>Content Cell</td></tr>
<tr><td>Content Cell </td><td>Content Cell</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>First Header </th><th>Second Header</th></tr>
</thead>
<tbody>
<tr><td>Content Cell </td><td>Content Cell</td></tr>
<tr><td>Content Cell </td><td>Content Cell</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Name </th><th>Description</th></tr>
</thead>
<tbody>
<tr><td>Help </td><td>Display the help window.</td></tr>
<tr><td>Close </td><td>Closes a window</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Name </th><th>Description</th></tr>
</thead>
<tbody>
<tr><td>Help </td><td><strong>Display the</strong> help window.</td></tr>
<tr><td>Close </td><td><em>Closes</em> a window</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Default-Align </th><th align="left">Left-Aligned </th><th align="center">Center Aligned </th><th align="right">Right Aligned</th></tr>
</thead>
<tbody>
<tr><td>1 </td><td align="left">col 3 is </td><td align="center">some wordy text </td><td align="right">$1600</td></tr>
<tr><td>2 </td><td align="left">col 2 is </td><td align="center">centered </td><td align="right"> $12</td></tr>
<tr><td>3 </td><td align="left">zebra stripes </td><td align="center">are neat </td><td align="right"> $1</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Simple </th><th>Table</th></tr>
</thead>
<tbody>
<tr><td>1 </td><td>2</td></tr>
<tr><td>3 </td><td>4</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Simple </th><th>Table</th></tr>
</thead>
<tbody>
<tr><td>1 </td><td>2</td></tr>
<tr><td>3 </td><td>4</td></tr>
<tr><td>3 </td><td>4 |</td></tr>
<tr><td>3 </td><td>4 \</td></tr>
</tbody>
</table>
<p>Check https://github.com/erusev/parsedown/issues/184 for the following:</p>
<table>
<thead>
<tr><th>Foo </th><th>Bar </th><th>State</th></tr>
</thead>
<tbody>
<tr><td><code>Code | Pipe</code> </td><td>Broken </td><td>Blank</td></tr>
<tr><td><code>Escaped Code \| Pipe</code> </td><td>Broken </td><td>Blank</td></tr>
<tr><td>Escaped | Pipe </td><td>Broken </td><td>Blank</td></tr>
<tr><td>Escaped \</td><td>Pipe </td><td>Broken </td><td>Blank</td></tr>
<tr><td>Escaped \ </td><td>Pipe </td><td>Broken </td><td>Blank</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th align="left">Simple </th><th>Table</th></tr>
</thead>
<tbody>
<tr><td align="left">3 </td><td>4</td></tr>
</tbody>
</table>
<p>3 | 4</p>

View File

@@ -0,0 +1,56 @@
Tables
------
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
| Name | Description |
| ------------- | ----------- |
| Help | Display the help window.|
| Close | Closes a window |
| Name | Description |
| ------------- | ----------- |
| Help | **Display the** help window.|
| Close | _Closes_ a window |
| Default-Align | Left-Aligned | Center Aligned | Right Aligned |
| ------------- | :------------ |:---------------:| -----:|
| 1 | col 3 is | some wordy text | $1600 |
| 2 | col 2 is | centered | $12 |
| 3 | zebra stripes | are neat | $1 |
Simple | Table
------ | -----
1 | 2
3 | 4
| Simple | Table |
| ------ | ----- |
| 1 | 2 |
| 3 | 4 |
| 3 | 4 \|
| 3 | 4 \\|
Check https://github.com/erusev/parsedown/issues/184 for the following:
Foo | Bar | State
------ | ------ | -----
`Code | Pipe` | Broken | Blank
`Escaped Code \| Pipe` | Broken | Blank
Escaped \| Pipe | Broken | Blank
Escaped \\| Pipe | Broken | Blank
Escaped \\ | Pipe | Broken | Blank
| Simple | Table |
| :----- | ----- |
| 3 | 4 |
3 | 4

View File

@@ -0,0 +1,8 @@
<p>Not a headline but a code block:</p>
<pre><code>---
</code></pre>
<p>Not a headline but two HR:</p>
<hr />
<hr />
<hr />
<hr />

View File

@@ -0,0 +1,14 @@
Not a headline but a code block:
```
---
```
Not a headline but two HR:
***
---
---
***

View File

@@ -0,0 +1,5 @@
<p>this is <del>striked out</del> after</p>
<p><del>striked out</del></p>
<p>a line with ~~ in it ...</p>
<p>~~</p>
<p>~</p>

View File

@@ -0,0 +1,9 @@
this is ~~striked out~~ after
~~striked out~~
a line with ~~ in it ...
~~
~

View File

@@ -0,0 +1,52 @@
<h1>this is to test dense blocks (no newlines between them)</h1>
<hr />
<h2>what is Markdown?</h2>
<p>see <a href="http://en.wikipedia.org/wiki/Markdown">Wikipedia</a></p>
<h2>a h2</h2>
<p>paragraph</p>
<p>this is a paragraph, not a headline or list
next line</p>
<ul>
<li>whoo</li>
</ul>
<p>par</p>
<pre><code>code
code
</code></pre>
<p>par</p>
<h3>Tasks list</h3>
<ul>
<li>list items</li>
</ul>
<h2>headline1</h2>
<blockquote><p>quote
quote</p>
</blockquote>
<h2>headline2</h2>
<hr />
<h1>h1</h1>
<h2>h2</h2>
<hr />
<h3>h3</h3>
<ol>
<li>ol1</li>
<li>ol2</li>
</ol>
<h4>h4</h4>
<ul>
<li>listA</li>
<li>listB</li>
</ul>
<h5>h5</h5>
<h6>h6</h6>
<hr />
<hr />
<h2>changelog 1</h2>
<ul>
<li>17-Feb-2013 re-design</li>
</ul>
<hr />
<h2>changelog 2</h2>
<ul>
<li>17-Feb-2013 re-design</li>
</ul>

View File

@@ -0,0 +1,56 @@
# this is to test dense blocks (no newlines between them)
----
## what is Markdown?
see [Wikipedia][]
a h2
----
paragraph
this is a paragraph, not a headline or list
next line
- whoo
par
code
code
par
### Tasks list
- list items
headline1
---------
> quote
> quote
[Wikipedia]: http://en.wikipedia.org/wiki/Markdown
headline2
---------
----
# h1
## h2
---
### h3
1. ol1
2. ol2
#### h4
- listA
- listB
##### h5
###### h6
--------
----
## changelog 1
* 17-Feb-2013 re-design
----
## changelog 2
* 17-Feb-2013 re-design

View File

@@ -0,0 +1,23 @@
<p>Now we need to set:</p>
<pre><code class="language-php">'session' =&gt; [
'cookieParams' =&gt; [
'path' =&gt; '/path1/',
]
],
</code></pre>
<p>and</p>
<pre><code class="language-php">'session' =&gt; [
'cookieParams' =&gt; [
'path' =&gt; '/path2/',
]
],
</code></pre>
<p>In the following starts a Blockquote:</p>
<blockquote><p>this is a blockquote</p>
</blockquote>
<p>par</p>
<hr />
<p>par</p>
<p>This is some text</p>
<h1>Headline1</h1>
<p>more text</p>

View File

@@ -0,0 +1,27 @@
Now we need to set:
```php
'session' => [
'cookieParams' => [
'path' => '/path1/',
]
],
```
and
```php
'session' => [
'cookieParams' => [
'path' => '/path2/',
]
],
```
In the following starts a Blockquote:
> this is a blockquote
par
***
par
This is some text
# Headline1
more text

View File

@@ -0,0 +1,19 @@
<h1>GitHub Flavored Markdown</h1>
<h2>Multiple underscores in words</h2>
<p>do_this_and_do_that_and_another_thing</p>
<h2>URL autolinking</h2>
<p><a href="http://example.com">http://example.com</a></p>
<h2>Strikethrough</h2>
<p><del>Mistaken text.</del></p>
<h2>Fenced code blocks</h2>
<pre><code>function test() {
console.log("notice the blank line before this function?");
}
</code></pre>
<h2>Syntax highlighting</h2>
<pre><code class="language-ruby">require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
</code></pre>
<pre><code>this is also code
</code></pre>

View File

@@ -0,0 +1,40 @@
GitHub Flavored Markdown
========================
Multiple underscores in words
-----------------------------
do_this_and_do_that_and_another_thing
URL autolinking
---------------
http://example.com
Strikethrough
-------------
~~Mistaken text.~~
Fenced code blocks
------------------
```
function test() {
console.log("notice the blank line before this function?");
}
```
Syntax highlighting
-------------------
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
~~~
this is also code
~~~

View File

@@ -0,0 +1,12 @@
<ol>
<li>Item one.</li>
<li><p>Item two with some code:</p>
<pre><code>code one
</code></pre>
</li>
<li><p>Item three with code:</p>
<pre><code>code two
</code></pre>
</li>
</ol>
<p>Paragraph.</p>

View File

@@ -0,0 +1,14 @@
1. Item one.
2. Item two with some code:
```
code one
```
3. Item three with code:
```
code two
```
Paragraph.

View File

@@ -0,0 +1,117 @@
<h1>GitHub Flavored Markdown</h1>
<p><em>View the <a href="http://github.github.com/github-flavored-markdown/sample_content.html">source of this content</a>.</em></p>
<p>Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:</p>
<p>Roses are red
Violets are blue</p>
<p>The next paragraph has the same phrases, but now they are separated by two spaces and a newline character:</p>
<p>Roses are red<br />
Violets are blue</p>
<p>Oh, and one thing I cannot stand is the mangling of words with multiple underscores in them like perform_complicated_task or do_this_and_do_that_and_another_thing.</p>
<h2>A bit of the GitHub spice</h2>
<p>In addition to the changes in the previous section, certain references are auto-linked:</p>
<ul>
<li>SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2</li>
<li>User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2</li>
<li>User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2</li>
<li>#Num: #1</li>
<li>User/#Num: mojombo#1</li>
<li>User/Project#Num: mojombo/god#1</li>
</ul>
<p>These are dangerous goodies though, and we need to make sure email addresses don't get mangled:</p>
<p>My email addy is tom@github.com.</p>
<h2>Math is hard, let's go shopping</h2>
<p>In first grade I learned that 5 &gt; 3 and 2 &lt; 7. Maybe some arrows. 1 -&gt; 2 -&gt; 3. 9 &lt;- 8 &lt;- 7.</p>
<p>Triangles man! a^2 + b^2 = c^2</p>
<h2>We all like making lists</h2>
<p>The above header should be an H2 tag. Now, for a list of fruits:</p>
<ul>
<li>Red Apples</li>
<li>Purple Grapes</li>
<li>Green Kiwifruits</li>
</ul>
<p>Let's get crazy:</p>
<ol>
<li><p>This is a list item with two paragraphs. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
mi posuere lectus.</p>
<p>Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
sit amet velit.</p>
</li>
<li><p>Suspendisse id sem consectetuer libero luctus adipiscing.</p>
</li>
</ol>
<p>What about some code <strong>in</strong> a list? That's insane, right?</p>
<ol>
<li><p>In Ruby you can map like this:</p>
<pre><code> ['a', 'b'].map { |x| x.uppercase }
</code></pre>
</li>
<li><p>In Rails, you can do a shortcut:</p>
<pre><code> ['a', 'b'].map(&amp;:uppercase)
</code></pre>
</li>
</ol>
<p>Some people seem to like definition lists</p>
<dl>
<dt>Lower cost</dt>
<dd>The new version of this product costs significantly less than the previous one!</dd>
<dt>Easier to use</dt>
<dd>We've changed the product so that it's much easier to use!</dd>
</dl>
<h2>I am a robot</h2>
<p>Maybe you want to print <code>robot</code> to the console 1000 times. Why not?</p>
<pre><code>def robot_invasion
puts("robot " * 1000)
end
</code></pre>
<p>You see, that was formatted as code because it's been indented by four spaces.</p>
<p>How about we throw some angle braces and ampersands in there?</p>
<pre><code>&lt;div class="footer"&gt;
&amp;copy; 2004 Foo Corporation
&lt;/div&gt;
</code></pre>
<h2>Set in stone</h2>
<p>Preformatted blocks are useful for ASCII art:</p>
<pre>
,-.
, ,-. ,-.
/ \ ( )-( )
\ | ,.>-( )-<
\|,' ( )-( )
Y ___`-' `-'
|/__/ `-'
|
|
| -hrr-
___|_____________
</pre>
<h2>Playing the blame game</h2>
<p>If you need to blame someone, the best way to do so is by quoting them:</p>
<blockquote><p>I, at any rate, am convinced that He does not throw dice.</p>
</blockquote>
<p>Or perhaps someone a little less eloquent:</p>
<blockquote><p>I wish you'd have given me this written question ahead of time so I
could plan for it... I'm sure something will pop into my head here in
the midst of this press conference, with all the pressure of trying to
come up with answer, but it hadn't yet...</p>
<p>I don't want to sound like
I have made no mistakes. I'm confident I have. I just haven't - you
just put me under the spot here, and maybe I'm not as quick on my feet
as I should be in coming up with one.</p>
</blockquote>
<h2>Table for two</h2>
<table>
<tr>
<th>ID</th><th>Name</th><th>Rank</th>
</tr>
<tr>
<td>1</td><td>Tom Preston-Werner</td><td>Awesome</td>
</tr>
<tr>
<td>2</td><td>Albert Einstein</td><td>Nearly as awesome</td>
</tr>
</table>
<h2>Crazy linking action</h2>
<p>I get 10 times more traffic from <a href="http://google.com/" title="Google">Google</a> than from
<a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>

View File

@@ -0,0 +1,159 @@
GitHub Flavored Markdown
================================
*View the [source of this content](http://github.github.com/github-flavored-markdown/sample_content.html).*
Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:
Roses are red
Violets are blue
The next paragraph has the same phrases, but now they are separated by two spaces and a newline character:
Roses are red
Violets are blue
Oh, and one thing I cannot stand is the mangling of words with multiple underscores in them like perform_complicated_task or do_this_and_do_that_and_another_thing.
A bit of the GitHub spice
-------------------------
In addition to the changes in the previous section, certain references are auto-linked:
* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* \#Num: #1
* User/#Num: mojombo#1
* User/Project#Num: mojombo/god#1
These are dangerous goodies though, and we need to make sure email addresses don't get mangled:
My email addy is tom@github.com.
Math is hard, let's go shopping
-------------------------------
In first grade I learned that 5 > 3 and 2 < 7. Maybe some arrows. 1 -> 2 -> 3. 9 <- 8 <- 7.
Triangles man! a^2 + b^2 = c^2
We all like making lists
------------------------
The above header should be an H2 tag. Now, for a list of fruits:
* Red Apples
* Purple Grapes
* Green Kiwifruits
Let's get crazy:
1. This is a list item with two paragraphs. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
sit amet velit.
2. Suspendisse id sem consectetuer libero luctus adipiscing.
What about some code **in** a list? That's insane, right?
1. In Ruby you can map like this:
['a', 'b'].map { |x| x.uppercase }
2. In Rails, you can do a shortcut:
['a', 'b'].map(&:uppercase)
Some people seem to like definition lists
<dl>
<dt>Lower cost</dt>
<dd>The new version of this product costs significantly less than the previous one!</dd>
<dt>Easier to use</dt>
<dd>We've changed the product so that it's much easier to use!</dd>
</dl>
I am a robot
------------
Maybe you want to print `robot` to the console 1000 times. Why not?
def robot_invasion
puts("robot " * 1000)
end
You see, that was formatted as code because it's been indented by four spaces.
How about we throw some angle braces and ampersands in there?
<div class="footer">
&copy; 2004 Foo Corporation
</div>
Set in stone
------------
Preformatted blocks are useful for ASCII art:
<pre>
,-.
, ,-. ,-.
/ \ ( )-( )
\ | ,.>-( )-<
\|,' ( )-( )
Y ___`-' `-'
|/__/ `-'
|
|
| -hrr-
___|_____________
</pre>
Playing the blame game
----------------------
If you need to blame someone, the best way to do so is by quoting them:
> I, at any rate, am convinced that He does not throw dice.
Or perhaps someone a little less eloquent:
> I wish you'd have given me this written question ahead of time so I
> could plan for it... I'm sure something will pop into my head here in
> the midst of this press conference, with all the pressure of trying to
> come up with answer, but it hadn't yet...
>
> I don't want to sound like
> I have made no mistakes. I'm confident I have. I just haven't - you
> just put me under the spot here, and maybe I'm not as quick on my feet
> as I should be in coming up with one.
Table for two
-------------
<table>
<tr>
<th>ID</th><th>Name</th><th>Rank</th>
</tr>
<tr>
<td>1</td><td>Tom Preston-Werner</td><td>Awesome</td>
</tr>
<tr>
<td>2</td><td>Albert Einstein</td><td>Nearly as awesome</td>
</tr>
</table>
Crazy linking action
--------------------
I get 10 times more traffic from [Google] [1] than from
[Yahoo] [2] or [MSN] [3].
[1]: http://google.com/ "Google"
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"

View File

@@ -0,0 +1,5 @@
<pre><code>hey, check [this].
[this]: https://github.com/cebe/markdown
</code></pre>
<p>is a vaild reference.</p>

View File

@@ -0,0 +1,6 @@
```
hey, check [this].
[this]: https://github.com/cebe/markdown
```
is a vaild reference.

View File

@@ -0,0 +1,21 @@
<blockquote><p>some text
`<code>`
// some code
\</code>``</p>
</blockquote>
<blockquote><p>some text</p>
<pre><code>// some code
</code></pre>
</blockquote>
<blockquote><p>some text</p>
<pre><code>// some code
</code></pre>
</blockquote>
<blockquote><p>some text</p>
<pre><code>// some code
</code></pre>
</blockquote>
<blockquote><p>some text</p>
</blockquote>
<pre><code>// some code
</code></pre>

View File

@@ -0,0 +1,26 @@
> some text
\```
// some code
\```
> some text
```
// some code
```
> some text
> ```
// some code
```
> some text
>
> ```
// some code
```
> some text
```
// some code
```

View File

@@ -0,0 +1,16 @@
<p>Text before list:</p>
<ul>
<li>item 1,</li>
<li>item 2,</li>
<li>item 3.</li>
</ul>
<p>Text after list.</p>
<ul>
<li>test</li>
<li>test<ul>
<li>test</li>
<li>test</li>
</ul>
</li>
<li>test</li>
</ul>

View File

@@ -0,0 +1,12 @@
Text before list:
* item 1,
* item 2,
* item 3.
Text after list.
- test
- test
- test
- test
- test

View File

@@ -0,0 +1,5 @@
<h2>Non-tables</h2>
<p>This line contains two pipes but is not a table. [[yii\widgets\DetailView|DetailView]] widget displays the details of a single data [[yii\widgets\DetailView::$model|model]].</p>
<p>the line above contains a space.</p>
<p>looks | like | head
-:| </p>

View File

@@ -0,0 +1,9 @@
Non-tables
----------
This line contains two pipes but is not a table. [[yii\widgets\DetailView|DetailView]] widget displays the details of a single data [[yii\widgets\DetailView::$model|model]].
the line above contains a space.
looks | like | head
-:|

View File

@@ -0,0 +1,117 @@
<h2>Tables</h2>
<table>
<thead>
<tr><th>First Header </th><th>Second Header</th></tr>
</thead>
<tbody>
<tr><td>Content Cell </td><td>Content Cell</td></tr>
<tr><td>Content Cell </td><td>Content Cell</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>First Header </th><th>Second Header</th></tr>
</thead>
<tbody>
<tr><td>Content Cell </td><td>Content Cell</td></tr>
<tr><td>Content Cell </td><td>Content Cell</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Name </th><th>Description</th></tr>
</thead>
<tbody>
<tr><td>Help </td><td>Display the help window.</td></tr>
<tr><td>Close </td><td>Closes a window</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Name </th><th>Description</th></tr>
</thead>
<tbody>
<tr><td>Help </td><td><strong>Display the</strong> help window.</td></tr>
<tr><td>Close </td><td><em>Closes</em> a window</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Default-Align </th><th align="left">Left-Aligned </th><th align="center">Center Aligned </th><th align="right">Right Aligned</th></tr>
</thead>
<tbody>
<tr><td>1 </td><td align="left">col 3 is </td><td align="center">some wordy text </td><td align="right">$1600</td></tr>
<tr><td>2 </td><td align="left">col 2 is </td><td align="center">centered </td><td align="right"> $12</td></tr>
<tr><td>3 </td><td align="left">zebra stripes </td><td align="center">are neat </td><td align="right"> $1</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Simple </th><th>Table</th></tr>
</thead>
<tbody>
<tr><td>1 </td><td>2</td></tr>
<tr><td>3 </td><td>4</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Simple </th><th>Table</th></tr>
</thead>
<tbody>
<tr><td>1 </td><td>2</td></tr>
<tr><td>3 </td><td>4</td></tr>
<tr><td>3 </td><td>4 |</td></tr>
<tr><td>3 </td><td>4 \</td></tr>
</tbody>
</table>
<p>Check <a href="https://github.com/erusev/parsedown/issues/184">https://github.com/erusev/parsedown/issues/184</a> for the following:</p>
<table>
<thead>
<tr><th>Foo </th><th>Bar </th><th>State</th></tr>
</thead>
<tbody>
<tr><td><code>Code | Pipe</code> </td><td>Broken </td><td>Blank</td></tr>
<tr><td><code>Escaped Code \| Pipe</code> </td><td>Broken </td><td>Blank</td></tr>
<tr><td>Escaped | Pipe </td><td>Broken </td><td>Blank</td></tr>
<tr><td>Escaped \</td><td>Pipe </td><td>Broken </td><td>Blank</td></tr>
<tr><td>Escaped \ </td><td>Pipe </td><td>Broken </td><td>Blank</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th align="left">Simple </th><th>Table</th></tr>
</thead>
<tbody>
<tr><td align="left">3 </td><td>4</td></tr>
</tbody>
</table>
<p>3 | 4</p>
<table>
<thead>
<tr><th>Table </th><th>With </th><th>Empty </th><th>Cells</th></tr>
</thead>
<tbody>
<tr><td></td><td> </td><td> </td><td></td></tr>
<tr><td>a </td><td> </td><td> b </td><td></td></tr>
<tr><td></td><td> a </td><td> </td><td> b</td></tr>
<tr><td>a </td><td> </td><td> </td><td> b</td></tr>
<tr><td></td><td> a </td><td> b </td><td></td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th></th></tr>
</thead>
<tbody>
<tr><td></td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th></th><th></th></tr>
</thead>
<tbody>
<tr><td></td><td></td></tr>
</tbody>
</table>

View File

@@ -0,0 +1,72 @@
Tables
------
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
| Name | Description |
| ------------- | ----------- |
| Help | Display the help window.|
| Close | Closes a window |
| Name | Description |
| ------------- | ----------- |
| Help | **Display the** help window.|
| Close | _Closes_ a window |
| Default-Align | Left-Aligned | Center Aligned | Right Aligned |
| ------------- | :------------ |:---------------:| -----:|
| 1 | col 3 is | some wordy text | $1600 |
| 2 | col 2 is | centered | $12 |
| 3 | zebra stripes | are neat | $1 |
Simple | Table
------ | -----
1 | 2
3 | 4
| Simple | Table |
| ------ | ----- |
| 1 | 2 |
| 3 | 4 |
| 3 | 4 \|
| 3 | 4 \\|
Check https://github.com/erusev/parsedown/issues/184 for the following:
Foo | Bar | State
------ | ------ | -----
`Code | Pipe` | Broken | Blank
`Escaped Code \| Pipe` | Broken | Blank
Escaped \| Pipe | Broken | Blank
Escaped \\| Pipe | Broken | Blank
Escaped \\ | Pipe | Broken | Blank
| Simple | Table |
| :----- | ----- |
| 3 | 4 |
3 | 4
| Table | With | Empty | Cells |
| ----- | ---- | ----- | ----- |
| | | | |
| a | | b | |
| | a | | b |
| a | | | b |
| | a | b | |
|
-- | --
|
| | |
| - | - |
| | |

View File

@@ -0,0 +1,8 @@
<p>Not a headline but a code block:</p>
<pre><code>---
</code></pre>
<p>Not a headline but two HR:</p>
<hr />
<hr />
<hr />
<hr />

View File

@@ -0,0 +1,14 @@
Not a headline but a code block:
```
---
```
Not a headline but two HR:
***
---
---
***

View File

@@ -0,0 +1,16 @@
<p>here is the url: <a href="http://www.cebe.cc/">http://www.cebe.cc/</a></p>
<p>here is the url: <a href="http://www.cebe.cc">http://www.cebe.cc</a></p>
<p>here is the url: <a href="http://www.cebe.cc/">http://www.cebe.cc/</a> and some text</p>
<p>using http is cool and http:// is the beginning of an url.</p>
<p>link should be url decoded: <a href="http://en.wikipedia.org/wiki/Mase_%28disambiguation%29">http://en.wikipedia.org/wiki/Mase_(disambiguation)</a></p>
<p>link in the end of the sentence: See this <a href="http://example.com/">http://example.com/</a>.</p>
<p>this one is in parenthesis (<a href="http://example.com/">http://example.com/</a>).</p>
<p>this one is in parenthesis (<a href="http://example.com:80/?id=1,2,3">http://example.com:80/?id=1,2,3</a>).</p>
<p>... (see <a href="http://en.wikipedia.org/wiki/Port_(computer_networking)">http://en.wikipedia.org/wiki/Port_(computer_networking)</a>).</p>
<p>... (see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)_more">https://en.wikipedia.org/wiki/Port_(computer_networking)_more</a>).</p>
<p>... (see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)_more">https://en.wikipedia.org/wiki/Port_(computer_networking)_more</a>). ... (see <a href="http://en.wikipedia.org/wiki/Port_(computer_networking)">http://en.wikipedia.org/wiki/Port_(computer_networking)</a>).</p>
<p>... (see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)_more">https://en.wikipedia.org/wiki/Port_(computer_networking)_more</a>)....(<a href="http://en.wikipedia.org/wiki/Port_(computer_networking)">http://en.wikipedia.org/wiki/Port_(computer_networking)</a>).</p>
<p>... (see <a href="http://en.wikipedia.org/wiki/Port">http://en.wikipedia.org/wiki/Port</a>)</p>
<p>... (see <a href="http://en.wikipedia.org/wiki/Port">http://en.wikipedia.org/wiki/Port</a>).</p>
<p><a href="http://www.cebe.cc">http://www.cebe.cc</a>, <a href="http://www.cebe.net">http://www.cebe.net</a>, and so on</p>
<p><a href="http://www.google.com/">link to http://www.google.com/</a></p>

View File

@@ -0,0 +1,31 @@
here is the url: http://www.cebe.cc/
here is the url: http://www.cebe.cc
here is the url: http://www.cebe.cc/ and some text
using http is cool and http:// is the beginning of an url.
link should be url decoded: http://en.wikipedia.org/wiki/Mase_%28disambiguation%29
link in the end of the sentence: See this http://example.com/.
this one is in parenthesis (http://example.com/).
this one is in parenthesis (http://example.com:80/?id=1,2,3).
... (see http://en.wikipedia.org/wiki/Port_(computer_networking)).
... (see https://en.wikipedia.org/wiki/Port_(computer_networking)_more).
... (see https://en.wikipedia.org/wiki/Port_(computer_networking)_more). ... (see http://en.wikipedia.org/wiki/Port_(computer_networking)).
... (see https://en.wikipedia.org/wiki/Port_(computer_networking)_more)....(http://en.wikipedia.org/wiki/Port_(computer_networking)).
... (see http://en.wikipedia.org/wiki/Port)
... (see http://en.wikipedia.org/wiki/Port).
http://www.cebe.cc, http://www.cebe.net, and so on
[link to http://www.google.com/](http://www.google.com/)

View File

@@ -0,0 +1 @@
All tests prefixed with `md1_` are taken from http://daringfireball.net/projects/downloads/MarkdownTest_1.0.zip

View File

@@ -0,0 +1,11 @@
<blockquote><h2>This is a header.</h2>
<ol>
<li>This is the first list item.</li>
<li>This is the second list item.</li>
</ol>
<p>Here's some example code:</p>
<pre><code>return shell_exec("echo $input | $markdown_script");
</code></pre>
<blockquote><p>quote here</p>
</blockquote>
</blockquote>

View File

@@ -0,0 +1,10 @@
> ## This is a header.
>
> 1. This is the first list item.
> 2. This is the second list item.
>
> Here's some example code:
>
> return shell_exec("echo $input | $markdown_script");
>
> > quote here

View File

@@ -0,0 +1,9 @@
<blockquote><p>test test
test</p>
</blockquote>
<blockquote><p>test
test
test</p>
</blockquote>
<p>test</p>
<p>&gt;this is not a quote</p>

View File

@@ -0,0 +1,10 @@
> test test
> test
> test
test
test
test
>this is not a quote

View File

@@ -0,0 +1,12 @@
<p>this is <code>inline code</code></p>
<p>this is <code>`inline code</code>`</p>
<p>this is <code>inline code</code></p>
<p>this is <code>inline ` code</code></p>
<p>this is <code>inline `` code</code></p>
<pre><code>code block
code block
</code></pre>
<p>this is code too: <code> co
ooo
de </code></p>

View File

@@ -0,0 +1,17 @@
this is `inline code`
this is ``inline code``
this is `` inline code ``
this is `` inline ` code ``
this is ``` inline `` code ```
code block
code block
this is code too: ` co
ooo
de `

View File

@@ -0,0 +1,50 @@
<h1>this is to test dense blocks (no newlines between them)</h1>
<hr />
<h2>what is Markdown?</h2>
<p>see <a href="http://en.wikipedia.org/wiki/Markdown">Wikipedia</a></p>
<h2>a h2</h2>
<p>paragraph</p>
<p>this is a paragraph, not a headline or list
next line
- whoo</p>
<p>par</p>
<pre><code>code
code
</code></pre>
<p>par</p>
<h3>Tasks list</h3>
<ul>
<li>list items</li>
</ul>
<h2>headline1</h2>
<blockquote><p>quote
quote</p>
</blockquote>
<h2>headline2</h2>
<hr />
<h1>h1</h1>
<h2>h2</h2>
<hr />
<h3>h3</h3>
<ol>
<li>ol1</li>
<li>ol2</li>
</ol>
<h4>h4</h4>
<ul>
<li>listA</li>
<li>listB</li>
</ul>
<h5>h5</h5>
<h6>h6</h6>
<hr />
<hr />
<h2>changelog 1</h2>
<ul>
<li>17-Feb-2013 re-design</li>
</ul>
<hr />
<h2>changelog 2</h2>
<ul>
<li>17-Feb-2013 re-design</li>
</ul>

View File

@@ -0,0 +1,56 @@
# this is to test dense blocks (no newlines between them)
----
## what is Markdown?
see [Wikipedia][]
a h2
----
paragraph
this is a paragraph, not a headline or list
next line
- whoo
par
code
code
par
### Tasks list
- list items
headline1
---------
> quote
> quote
[Wikipedia]: http://en.wikipedia.org/wiki/Markdown
headline2
---------
----
# h1
## h2
---
### h3
1. ol1
2. ol2
#### h4
- listA
- listB
##### h5
###### h6
--------
----
## changelog 1
* 17-Feb-2013 re-design
----
## changelog 2
* 17-Feb-2013 re-design

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
<p>this is <strong>strong</strong> and this is <strong>strong</strong>.</p>
<p>this is <em>em</em> and this is <em>em</em>.</p>
<p><em><code>code</code></em> <strong><code>code</code></strong></p>
<p><em><code>code</code><strong><code>code</code></strong><code>code</code></em></p>
<p>Hey <em>this is
italic</em></p>
<p>Hey <strong>this is
bold</strong></p>
<p><strong>strong text</strong><em>emphasized text</em></p>
<p><em>emphasized text</em><strong>strong text</strong></p>
<p><strong>strong text</strong><em>emphasized text</em></p>
<p><em>emphasized text</em><strong>strong text</strong></p>
<p><strong>strong text</strong><em>emphasized text</em></p>
<p><em>emphasized text</em><strong>strong text</strong></p>
<p>simple_word_with_underscores</p>
<p>this is text, <em>this is emph</em> simple_word_with_underscores text again.</p>

View File

@@ -0,0 +1,29 @@
this is __strong__ and this is **strong**.
this is _em_ and this is *em*.
_`code`_ __`code`__
*`code`**`code`**`code`*
Hey *this is
italic*
Hey **this is
bold**
**strong text***emphasized text*
*emphasized text***strong text**
**strong text**_emphasized text_
*emphasized text*__strong text__
__strong text__*emphasized text*
_emphasized text_**strong text**
simple_word_with_underscores
this is text, _this is emph_ simple_word_with_underscores text again.

View File

@@ -0,0 +1,8 @@
<p>0</p>
<p>0
Lorem ipsum dolor</p>
<p>Lorem ipsum dolor
0</p>
<pre><code>code
</code></pre>
<p>0</p>

View File

@@ -0,0 +1,11 @@
0
0
Lorem ipsum dolor
Lorem ipsum dolor
0
code
0

View File

@@ -0,0 +1,9 @@
<h2>Creating an Action <a name="creating-action"></a></h2>
<p>For the "Hello" task, you will create a <code>say</code> <a href="structure-controllers.md#creating-actions">action</a> that reads
a <code>message</code> parameter from the request and displays that message back to the user. If the request
does not provide a <code>message</code> parameter, the action will display the default "Hello" message.</p>
<blockquote><p>Info: <a href="structure-controllers.md#creating-actions">Actions</a> are the objects that end users can directly refer to for
execution. Actions are grouped by <a href="structure-controllers.md">controllers</a>. The execution result of
an action is the response that an end user will receive.</p>
</blockquote>
<p>Actions must be declared in ...</p>

View File

@@ -0,0 +1,12 @@
Creating an Action <a name="creating-action"></a>
------------------
For the "Hello" task, you will create a `say` [action](structure-controllers.md#creating-actions) that reads
a `message` parameter from the request and displays that message back to the user. If the request
does not provide a `message` parameter, the action will display the default "Hello" message.
> Info: [Actions](structure-controllers.md#creating-actions) are the objects that end users can directly refer to for
execution. Actions are grouped by [controllers](structure-controllers.md). The execution result of
an action is the response that an end user will receive.
Actions must be declared in ...

View File

@@ -0,0 +1,3 @@
<p>nice <a href="http://www.youtube.com/video-on\e">video</a>. Nice-vide\o star *</p>
<p>nice <img src="http://www.youtube.com/video-on\e" alt="video" />. Nice-vide\o star *</p>
<p><a href="http://www.youtube.com/video-on\e">video</a> and <a href="http://www.youtube.com/video-on\e">http://www.youtube.com/video-on\e</a> and <a href="mailto:m\a-il@cebe.cc">m\a-il@cebe.cc</a></p>

View File

@@ -0,0 +1,7 @@
nice [video](http://www.youtube.com/video\-on\e). Nice\-vide\o star \*
nice ![video](http://www.youtube.com/video\-on\e). Nice\-vide\o star \*
[video]: http://www.youtube.com/video\-on\e
[video] and <http://www.youtube.com/video\-on\e> and <m\a\-il@cebe.cc>

View File

@@ -0,0 +1,21 @@
<h1>a h1 heading</h1>
<p>par1</p>
<h2>a h2 heading</h2>
<p>par2</p>
<h4>a h4 heading</h4>
<p>par3</p>
<h1>another h1</h1>
<p>par4</p>
<h2>another h2</h2>
<p>par5</p>
<h4>a h4 heading</h4>
<h4>a h4 heading</h4>
<h6>h6</h6>
<h6>h7</h6>
<p><a name="example"></a></p>
<h2>head</h2>
<p>hallo
hallo</p>
<h1>test</h1>
<p>test</p>
<p>#1 has been fixed</p>

View File

@@ -0,0 +1,41 @@
# a h1 heading
par1
## a h2 heading
par2
#### a h4 heading
par3
another h1
==========
par4
another h2
----------
par5
#### a h4 heading ####
#### a h4 heading ########
###### h6
####### h7
<a name="example"></a>
head
----
hallo
hallo
test
====
test
#1 has been fixed

View File

@@ -0,0 +1,15 @@
<hr />
<hr />
<hr />
<hr />
<hr />
<hr />
<hr />
<hr />
<hr />
<p>**</p>
<p>--</p>
<p></p>
<p>*</p>
<p>-</p>
<p></p>

View File

@@ -0,0 +1,29 @@
- - -
---
------
_ _ _
___
_____________
*********
* * *
***
**
--
*
-

View File

@@ -0,0 +1,42 @@
<p>paragraph 1 is here</p>
<table>
<tr>
<td>a</td>
<td>b</td>
</tr>
<tr>
<td>c</td>
<td>d</td>
</tr>
</table>
<p>more markdown here</p>
<p>&lt; this is not an html tag</p>
<p>&lt;thisisnotanhtmltag</p>
<p>but this is:</p>
<p><img src="file.jpg"
alt="some alt aligned with src attribute" title="some text" /></p>
<p><span class="test">some inline <strong>md</strong></span></p>
<p><span>some inline <strong>md</strong></span></p>
<p>self-closing on block level:</p>
<p>this is a paragraph</p>
<hr style="clear: both;" />
<p>something <strong>bold</strong>.</p>
<custom />
<h1>h1</h1>
<custom multi="line" something="hi" />
<h2>h2</h2>
<p>p <img src="file.jpg"
alt="some alt aligned with src attribute"
title="some text" />
something</p>
<p>p <img src="file.jpg"
alt="some alt aligned with src attribute"
title="some text" /></p>
<pre><code>something
</code></pre>
<p>p is &lt; than 5</p>
<pre><code>this is code
</code></pre>
<p>this paragraph contains a <!-- multi
line html comment -->
newline</p>

View File

@@ -0,0 +1,59 @@
paragraph 1 is here
<table>
<tr>
<td>a</td>
<td>b</td>
</tr>
<tr>
<td>c</td>
<td>d</td>
</tr>
</table>
more markdown here
< this is not an html tag
<thisisnotanhtmltag
but this is:
<img src="file.jpg"
alt="some alt aligned with src attribute" title="some text" />
<span class="test">some inline **md**</span>
<span>some inline **md**</span>
self-closing on block level:
<p>this is a paragraph</p>
<hr style="clear: both;" />
something **bold**.
<custom />
# h1
<custom multi="line" something="hi" />
## h2
p <img src="file.jpg"
alt="some alt aligned with src attribute"
title="some text" />
something
p <img src="file.jpg"
alt="some alt aligned with src attribute"
title="some text" />
something
p is < than 5
this is code
this paragraph contains a <!-- multi
line html comment -->
newline

View File

@@ -0,0 +1,14 @@
<p><img src="https://poser.pugx.org/cebe/markdown/downloads.png" alt="Total Downloads" />
<img src="https://secure.travis-ci.org/cebe/markdown.png" alt="Build Status" title="test1" /></p>
<p>Here is an image tag: <img src="https://poser.pugx.org/cebe/markdown/downloads.png" alt="Total Downloads" />.</p>
<p>Images inside of links:
<a href="https://packagist.org/packages/cebe/markdown"><img src="https://poser.pugx.org/cebe/markdown/downloads.png" alt="Total Downloads" /></a>
<!-- [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/cebe/markdown/badges/quality-score.png?s=17448ca4d140429fd687c58ff747baeb6568d528)](https://scrutinizer-ci.com/g/cebe/markdown/) -->
<a href="http://travis-ci.org/cebe/markdown"><img src="https://secure.travis-ci.org/cebe/markdown.png" alt="Build Status" title="test2" /></a>
<a href="http://travis-ci.org/cebe/markdown" title="test4"><img src="https://secure.travis-ci.org/cebe/markdown.png" alt="Build Status" title="test3" /></a></p>
<p>This is not an image: ![[ :-)</p>
<p>This is not an image: ![[ :-)]]</p>
<p><img src="/path/to/img.jpg" alt="Alt text" /></p>
<p><img src="/path/to/img.jpg" alt="Alt text" /></p>
<p><img src="/path/to/img.jpg" alt="Alt text" /></p>
<p><img src="/path/to/img.jpg" alt="Alt text" /></p>

View File

@@ -0,0 +1,22 @@
![Total Downloads](https://poser.pugx.org/cebe/markdown/downloads.png)
![Build Status](https://secure.travis-ci.org/cebe/markdown.png "test1")
Here is an image tag: ![Total Downloads](https://poser.pugx.org/cebe/markdown/downloads.png).
Images inside of links:
[![Total Downloads](https://poser.pugx.org/cebe/markdown/downloads.png)](https://packagist.org/packages/cebe/markdown)
<!-- [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/cebe/markdown/badges/quality-score.png?s=17448ca4d140429fd687c58ff747baeb6568d528)](https://scrutinizer-ci.com/g/cebe/markdown/) -->
[![Build Status](https://secure.travis-ci.org/cebe/markdown.png "test2")](http://travis-ci.org/cebe/markdown)
[![Build Status](https://secure.travis-ci.org/cebe/markdown.png "test3")](http://travis-ci.org/cebe/markdown "test4")
This is not an image: ![[ :-)
This is not an image: ![[ :-)]]
![Alt text](/path/to/img.jpg)
![Alt text]( /path/to/img.jpg)
![Alt text]( /path/to/img.jpg )
![Alt text](/path/to/img.jpg )

View File

@@ -0,0 +1,8 @@
<p>this is <span class="name">inline <strong>html</strong></span> trailing</p>
<p>&copy; AT&amp;T</p>
<p><del>this is deleted</del> this is not
new text on new line</p>
<p><s>this is deleted</s> this is not
new text on new line</p>
<p>this line ends with &lt;</p>
<p>this line ends with &amp;</p>

View File

@@ -0,0 +1,13 @@
this is <span class="name">inline **html**</span> trailing
&copy; AT&T
<del>this is deleted</del> this is not
new text on new line
<s>this is deleted</s> this is not
new text on new line
this line ends with <
this line ends with &

View File

@@ -0,0 +1,43 @@
<ul>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
viverra nec, fringilla in, laoreet vitae, risus.</li>
<li>Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
Suspendisse id sem consectetuer libero luctus adipiscing.</li>
</ul>
<ul>
<li><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
</li>
<li><p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit.</p>
</li>
</ul>
<ol>
<li>Item one.</li>
<li>Item two with some code:<pre><code>code one
</code></pre>
</li>
</ol>
<ol>
<li><p>Item one.</p>
</li>
<li><p>Paragraph 1</p>
<p>Paragraph 2</p>
</li>
<li><p>Item three with code:</p>
<pre><code>code two
</code></pre>
</li>
</ol>
<p>Paragraph.</p>
<ul>
<li><p>line1
line2</p>
<p>line1
line2</p>
<p>line1
line2
line3
line4</p>
</li>
</ul>
<p>line 5</p>

View File

@@ -0,0 +1,40 @@
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
viverra nec, fringilla in, laoreet vitae, risus.
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
Suspendisse id sem consectetuer libero luctus adipiscing.
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
1. Item one.
2. Item two with some code:
code one
1. Item one.
2. Paragraph 1
Paragraph 2
3. Item three with code:
code two
Paragraph.
- line1
line2
line1
line2
line1
line2
line3
line4
line 5

View File

@@ -0,0 +1,14 @@
<p>Go search on <a href="http://google.com">http://google.com</a>!</p>
<p>link should be url decoded: <a href="http://en.wikipedia.org/wiki/Mase_%28disambiguation%29">http://en.wikipedia.org/wiki/Mase_(disambiguation)</a></p>
<p>Brackets in url and backslashes in links:</p>
<p>About port info on wiki: <a href="http://en.wikipedia.org/wiki/Port_(computer_networking)">port</a></p>
<p>About port info on wiki: <a href="http://en.wikipedia.org/wiki/Port_(computer_networking)" title="port wiki">port</a></p>
<p><a href="https://www.google.com">I'm an inline-style link</a></p>
<p><a href="https://www.google.com" title="Google's Homepage">I'm an inline-style link with title</a>
and another one in the same paragraph:
<a href="https://www.google.com" title="Google's Homepage">I'm an inline-style link with title</a></p>
<p><a href="../blob/(master)/LICENSE">I'm a relative reference to a repository file</a></p>
<p>Or leave it empty and use the <a href="">link text itself</a></p>
<p>A <a href="http://example.com">link [in a link](http://example.com)</a></p>
<p>About port info on wiki: <a href="http://en.wikipedia.org/wiki/Port_(computer_networking)">port</a></p>
<p>About port info on wiki: <a href="http://en.wikipedia.org/wiki/Port_(computer_networking)" title="port wiki">port</a></p>

View File

@@ -0,0 +1,25 @@
Go search on <http://google.com>!
link should be url decoded: <http://en.wikipedia.org/wiki/Mase_%28disambiguation%29>
Brackets in url and backslashes in links:
About port info on wiki: [port](http://en.wikipedia.org/wiki/Port_(computer_networking))
About port info on wiki: [port](http://en.wikipedia.org/wiki/Port_(computer_networking) "port wiki")
[I'm an inline-style link](https://www.google.com)
[I'm an inline-style link with title](https://www.google.com "Google's Homepage")
and another one in the same paragraph:
[I'm an inline-style link with title](https://www.google.com "Google's Homepage")
[I'm a relative reference to a repository file](../blob/(master)/LICENSE)
Or leave it empty and use the [link text itself]()
A [link [in a link](http://example.com)](http://example.com)
About port info on wiki: [port]( http://en.wikipedia.org/wiki/Port_(computer_networking) )
About port info on wiki: [port]( http://en.wikipedia.org/wiki/Port_(computer_networking) "port wiki" )

View File

@@ -0,0 +1,7 @@
<p>In Markdown 1.0.0 and earlier. Version
8. This line turns into a list item.
Because a hard-wrapped line in the
middle of a paragraph looked like a
list item.</p>
<p>Here's one with a bullet.
* criminey</p>

View File

@@ -0,0 +1,8 @@
In Markdown 1.0.0 and earlier. Version
8. This line turns into a list item.
Because a hard-wrapped line in the
middle of a paragraph looked like a
list item.
Here's one with a bullet.
* criminey

View File

@@ -0,0 +1,59 @@
<ul>
<li>item1</li>
<li></li>
<li>item2</li>
<li>item3</li>
</ul>
<hr />
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
<hr />
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
<hr />
<ol>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ol>
<hr />
<ol>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ol>
<hr />
<ol>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ol>
<hr />
<ol>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ol>
<hr />
<ul>
<li>more indented line</li>
<li>different indent
-not a list item</li>
</ul>
<hr />
<ul>
<li>one item</li>
</ul>
<hr />
<ul>
<li><p>List...</p>
</li>
</ul>
<p>Ensure the above will not throw Exception</p>
<hr />

View File

@@ -0,0 +1,60 @@
- item1
-
- item2
- item3
---
* item1
* item2
* item3
---
+ item1
+ item2
+ item3
---
1. item1
2. item2
4. item3
---
4. item1
12. item2
125. item3
---
4. item1
12. item2
125. item3
---
4. item1
12. item2
125. item3
---
- more indented line
- different indent
-not a list item
---
- one item
---
- List...
Ensure the above will not throw Exception
---

View File

@@ -0,0 +1,9 @@
<p>link <a href="http://example.com/a">ref1</a></p>
<ul>
<li>item 1 <a href="http://example.com/b">ref2</a></li>
<li>item 2</li>
</ul>
<ul>
<li>item 1 <a href="http://example.com/b">ref2</a></li>
<li>item 2</li>
</ul>

View File

@@ -0,0 +1,13 @@
link [ref1]
- item 1 [ref2]
- item 2
[ref1]: http://example.com/a
[ref2]: http://example.com/b
- item 1 [ref2]
- item 2
[ref3]: http://example.com/a

View File

@@ -0,0 +1,10 @@
<ul>
<li><p>[[\yii\caching\ApcCache]]: uses PHP <a href="http://php.net/manual/en/book.apc.php">APC</a> extension. This option can be
considered as the fastest one when dealing with cache for a centralized thick application (e.g. one
server, no dedicated load balancers, etc.).</p>
</li>
<li><p>[[\yii\caching\DbCache]]: uses a database table to store cached data. By default, it will create and use a
<a href="http://sqlite.org/">SQLite3</a> database under the runtime directory. You can explicitly specify a database for
it to use by setting its <code>db</code> property.</p>
</li>
</ul>

View File

@@ -0,0 +1,7 @@
* [[\yii\caching\ApcCache]]: uses PHP [APC](http://php.net/manual/en/book.apc.php) extension. This option can be
considered as the fastest one when dealing with cache for a centralized thick application (e.g. one
server, no dedicated load balancers, etc.).
* [[\yii\caching\DbCache]]: uses a database table to store cached data. By default, it will create and use a
[SQLite3](http://sqlite.org/) database under the runtime directory. You can explicitly specify a database for
it to use by setting its `db` property.

View File

@@ -0,0 +1,8 @@
<p>AT&amp;T has an ampersand in their name.</p>
<p>AT&amp;T is another way to write it.</p>
<p>This &amp; that.</p>
<p>4 &lt; 5.</p>
<p>6 &gt; 5.</p>
<p>Here's a <a href="http://example.com/?foo=1&amp;bar=2">link</a> with an ampersand in the URL.</p>
<p>Here's a link with an amersand in the link text: <a href="http://att.com/" title="AT&amp;T">AT&amp;T</a>.</p>
<p>Here's an inline <a href="/script?foo=1&amp;bar=2">link</a>.</p>

View File

@@ -0,0 +1,19 @@
AT&T has an ampersand in their name.
AT&amp;T is another way to write it.
This & that.
4 < 5.
6 > 5.
Here's a [link] [1] with an ampersand in the URL.
Here's a link with an amersand in the link text: [AT&T] [2].
Here's an inline [link](/script?foo=1&bar=2).
[1]: http://example.com/?foo=1&bar=2
[2]: http://att.com/ "AT&T"

View File

@@ -0,0 +1,12 @@
<p>Link: <a href="http://example.com/">http://example.com/</a>.</p>
<p>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2">http://example.com/?foo=1&amp;bar=2</a></p>
<ul>
<li>In a list?</li>
<li><a href="http://example.com/">http://example.com/</a></li>
<li>It should.</li>
</ul>
<blockquote><p>Blockquoted: <a href="http://example.com/">http://example.com/</a></p>
</blockquote>
<p>Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code></p>
<pre><code>or here: &lt;http://example.com/&gt;
</code></pre>

View File

@@ -0,0 +1,13 @@
Link: <http://example.com/>.
With an ampersand: <http://example.com/?foo=1&bar=2>
* In a list?
* <http://example.com/>
* It should.
> Blockquoted: <http://example.com/>
Auto-links should not occur here: `<http://example.com/>`
or here: <http://example.com/>

View File

@@ -0,0 +1,67 @@
<p>These should all get escaped:</p>
<p>Backslash: \</p>
<p>Backtick: `</p>
<p>Asterisk: *</p>
<p>Underscore: _</p>
<p>Left brace: {</p>
<p>Right brace: }</p>
<p>Left bracket: [</p>
<p>Right bracket: ]</p>
<p>Left paren: (</p>
<p>Right paren: )</p>
<p>Greater-than: ></p>
<p>Hash: #</p>
<p>Period: .</p>
<p>Bang: !</p>
<p>Plus: +</p>
<p>Minus: -</p>
<p>These should not, because they occur within a code block:</p>
<pre><code>Backslash: \\
Backtick: \`
Asterisk: \*
Underscore: \_
Left brace: \{
Right brace: \}
Left bracket: \[
Right bracket: \]
Left paren: \(
Right paren: \)
Greater-than: \&gt;
Hash: \#
Period: \.
Bang: \!
Plus: \+
Minus: \-
</code></pre>
<p>Nor should these, which occur in code spans:</p>
<p>Backslash: <code>\\</code></p>
<p>Backtick: <code>\`</code></p>
<p>Asterisk: <code>\*</code></p>
<p>Underscore: <code>\_</code></p>
<p>Left brace: <code>\{</code></p>
<p>Right brace: <code>\}</code></p>
<p>Left bracket: <code>\[</code></p>
<p>Right bracket: <code>\]</code></p>
<p>Left paren: <code>\(</code></p>
<p>Right paren: <code>\)</code></p>
<p>Greater-than: <code>\&gt;</code></p>
<p>Hash: <code>\#</code></p>
<p>Period: <code>\.</code></p>
<p>Bang: <code>\!</code></p>
<p>Plus: <code>\+</code></p>
<p>Minus: <code>\-</code></p>

View File

@@ -0,0 +1,104 @@
These should all get escaped:
Backslash: \\
Backtick: \`
Asterisk: \*
Underscore: \_
Left brace: \{
Right brace: \}
Left bracket: \[
Right bracket: \]
Left paren: \(
Right paren: \)
Greater-than: \>
Hash: \#
Period: \.
Bang: \!
Plus: \+
Minus: \-
These should not, because they occur within a code block:
Backslash: \\
Backtick: \`
Asterisk: \*
Underscore: \_
Left brace: \{
Right brace: \}
Left bracket: \[
Right bracket: \]
Left paren: \(
Right paren: \)
Greater-than: \>
Hash: \#
Period: \.
Bang: \!
Plus: \+
Minus: \-
Nor should these, which occur in code spans:
Backslash: `\\`
Backtick: `` \` ``
Asterisk: `\*`
Underscore: `\_`
Left brace: `\{`
Right brace: `\}`
Left bracket: `\[`
Right bracket: `\]`
Left paren: `\(`
Right paren: `\)`
Greater-than: `\>`
Hash: `\#`
Period: `\.`
Bang: `\!`
Plus: `\+`
Minus: `\-`

View File

@@ -0,0 +1,11 @@
<blockquote><p>Example:</p>
<pre><code>sub status {
print "working";
}
</code></pre>
<p>Or:</p>
<pre><code>sub status {
return "working";
}
</code></pre>
</blockquote>

View File

@@ -0,0 +1,11 @@
> Example:
>
> sub status {
> print "working";
> }
>
> Or:
>
> sub status {
> return "working";
> }

View File

@@ -0,0 +1,39 @@
<p>Dashes:</p>
<hr />
<hr />
<hr />
<hr />
<pre><code>---
</code></pre>
<hr />
<hr />
<hr />
<hr />
<pre><code>- - -
</code></pre>
<p>Asterisks:</p>
<hr />
<hr />
<hr />
<hr />
<pre><code>***
</code></pre>
<hr />
<hr />
<hr />
<hr />
<pre><code>* * *
</code></pre>
<p>Underscores:</p>
<hr />
<hr />
<hr />
<hr />
<pre><code>___
</code></pre>
<hr />
<hr />
<hr />
<hr />
<pre><code>_ _ _
</code></pre>

View File

@@ -0,0 +1,67 @@
Dashes:
---
---
---
---
---
- - -
- - -
- - -
- - -
- - -
Asterisks:
***
***
***
***
***
* * *
* * *
* * *
* * *
* * *
Underscores:
___
___
___
___
___
_ _ _
_ _ _
_ _ _
_ _ _
_ _ _

View File

@@ -0,0 +1,11 @@
<p>Simple block on one line:</p>
<div>foo</div>
<p>And nested without indentation:</p>
<div>
<div>
<div>
foo
</div>
</div>
<div>bar</div>
</div>

View File

@@ -0,0 +1,14 @@
Simple block on one line:
<div>foo</div>
And nested without indentation:
<div>
<div>
<div>
foo
</div>
</div>
<div>bar</div>
</div>

View File

@@ -0,0 +1,8 @@
<p>Paragraph one.</p>
<!-- This is a simple comment -->
<!--
This is another comment.
-->
<p>Paragraph two.</p>
<!-- one comment block -- -- with two comments -->
<p>The end.</p>

View File

@@ -0,0 +1,13 @@
Paragraph one.
<!-- This is a simple comment -->
<!--
This is another comment.
-->
Paragraph two.
<!-- one comment block -- -- with two comments -->
The end.

View File

@@ -0,0 +1,46 @@
<p>Here's a simple block:</p>
<div>
foo
</div>
<p>This should be a code block, though:</p>
<pre><code>&lt;div&gt;
foo
&lt;/div&gt;
</code></pre>
<p>As should this:</p>
<pre><code>&lt;div&gt;foo&lt;/div&gt;
</code></pre>
<p>Now, nested:</p>
<div>
<div>
<div>
foo
</div>
</div>
</div>
<p>This should just be an HTML comment:</p>
<!-- Comment -->
<p>Multiline:</p>
<!--
Blah
Blah
-->
<p>Code block:</p>
<pre><code>&lt;!-- Comment --&gt;
</code></pre>
<p>Just plain comment, with trailing spaces on the line:</p>
<!-- foo -->
<p>Code:</p>
<pre><code>&lt;hr /&gt;
</code></pre>
<p>Hr's:</p>
<hr>
<hr/>
<hr />
<hr>
<hr/>
<hr />
<hr class="foo" id="bar" />
<hr class="foo" id="bar"/>
<hr class="foo" id="bar" >

View File

@@ -0,0 +1,69 @@
Here's a simple block:
<div>
foo
</div>
This should be a code block, though:
<div>
foo
</div>
As should this:
<div>foo</div>
Now, nested:
<div>
<div>
<div>
foo
</div>
</div>
</div>
This should just be an HTML comment:
<!-- Comment -->
Multiline:
<!--
Blah
Blah
-->
Code block:
<!-- Comment -->
Just plain comment, with trailing spaces on the line:
<!-- foo -->
Code:
<hr />
Hr's:
<hr>
<hr/>
<hr />
<hr>
<hr/>
<hr />
<hr class="foo" id="bar" />
<hr class="foo" id="bar"/>
<hr class="foo" id="bar" >

Some files were not shown because too many files have changed in this diff Show More