From 6917d7cc95a6aa82e1e01d8deab1e28d7e1d93e7 Mon Sep 17 00:00:00 2001
From: Zi Xing foobar foobar elements do matter
- $markup = preg_replace(
- array(
- '/(<(?!(?:' . $this->textLevelElementRegex . '|\bpre\b))\w+\b[^>]*>(?:<' . $this->textLevelElementRegex . '[^>]*>)*)\s+/s',
- '/\s+((?:<\/' . $this->textLevelElementRegex . '>)*<\/(?!' . $this->textLevelElementRegex . ')\w+\b>)/s'
- ),
- '$1',
- $markup
- );
-
- return $markup;
- }
-}
diff --git a/test/ParsedownTest.php b/test/ParsedownTest.php
deleted file mode 100755
index bf40317..0000000
--- a/test/ParsedownTest.php
+++ /dev/null
@@ -1,199 +0,0 @@
-dirs = $this->initDirs();
- $this->Parsedown = $this->initParsedown();
-
- parent::__construct($name, $data, $dataName);
- }
-
- private $dirs;
- protected $Parsedown;
-
- /**
- * @return array
- */
- protected function initDirs()
- {
- $dirs []= dirname(__FILE__).'/data/';
-
- return $dirs;
- }
-
- /**
- * @return Parsedown
- */
- protected function initParsedown()
- {
- $Parsedown = new TestParsedown();
-
- return $Parsedown;
- }
-
- /**
- * @dataProvider data
- * @param $test
- * @param $dir
- */
- function test_($test, $dir)
- {
- $markdown = file_get_contents($dir . $test . '.md');
-
- $expectedMarkup = file_get_contents($dir . $test . '.html');
-
- $expectedMarkup = str_replace("\r\n", "\n", $expectedMarkup);
- $expectedMarkup = str_replace("\r", "\n", $expectedMarkup);
-
- $this->Parsedown->setSafeMode(substr($test, 0, 3) === 'xss');
- $this->Parsedown->setStrictMode(substr($test, 0, 6) === 'strict');
-
- $actualMarkup = $this->Parsedown->text($markdown);
-
- $this->assertEquals($expectedMarkup, $actualMarkup);
- }
-
- function testRawHtml()
- {
- $markdown = "```php\nfoobar\n```";
- $expectedMarkup = '
';
- $expectedSafeMarkup = '
';
-
- $unsafeExtension = new UnsafeExtension;
- $actualMarkup = $unsafeExtension->text($markdown);
-
- $this->assertEquals($expectedMarkup, $actualMarkup);
-
- $unsafeExtension->setSafeMode(true);
- $actualSafeMarkup = $unsafeExtension->text($markdown);
-
- $this->assertEquals($expectedSafeMarkup, $actualSafeMarkup);
- }
-
- function testTrustDelegatedRawHtml()
- {
- $markdown = "```php\nfoobar\n```";
- $expectedMarkup = '<p>foobar</p>
';
- $expectedSafeMarkup = $expectedMarkup;
-
- $unsafeExtension = new TrustDelegatedExtension;
- $actualMarkup = $unsafeExtension->text($markdown);
-
- $this->assertEquals($expectedMarkup, $actualMarkup);
-
- $unsafeExtension->setSafeMode(true);
- $actualSafeMarkup = $unsafeExtension->text($markdown);
-
- $this->assertEquals($expectedSafeMarkup, $actualSafeMarkup);
- }
-
- function data()
- {
- $data = array();
-
- foreach ($this->dirs as $dir)
- {
- $Folder = new DirectoryIterator($dir);
-
- foreach ($Folder as $File)
- {
- /** @var $File DirectoryIterator */
-
- if ( ! $File->isFile())
- {
- continue;
- }
-
- $filename = $File->getFilename();
-
- $extension = pathinfo($filename, PATHINFO_EXTENSION);
-
- if ($extension !== 'md')
- {
- continue;
- }
-
- $basename = $File->getBasename('.md');
-
- if (file_exists($dir . $basename . '.html'))
- {
- $data []= array($basename, $dir);
- }
- }
- }
-
- return $data;
- }
-
- public function test_no_markup()
- {
- $markdownWithHtml = <<
sparse:
-<div> -<div class="inner"> -content -</div> -</div>
-paragraph
-<style type="text/css"> -p { -color: red; -} -</style>
-comment
-<!-- html comment -->
-EXPECTED_HTML; - - $parsedownWithNoMarkup = new TestParsedown(); - $parsedownWithNoMarkup->setMarkupEscaped(true); - $this->assertEquals($expectedHtml, $parsedownWithNoMarkup->text($markdownWithHtml)); - } - - public function testLateStaticBinding() - { - $parsedown = Parsedown::instance(); - $this->assertInstanceOf('Parsedown', $parsedown); - - // After instance is already called on Parsedown - // subsequent calls with the same arguments return the same instance - $sameParsedown = TestParsedown::instance(); - $this->assertInstanceOf('Parsedown', $sameParsedown); - $this->assertSame($parsedown, $sameParsedown); - - $testParsedown = TestParsedown::instance('test late static binding'); - $this->assertInstanceOf('TestParsedown', $testParsedown); - - $sameInstanceAgain = TestParsedown::instance('test late static binding'); - $this->assertSame($testParsedown, $sameInstanceAgain); - } -} diff --git a/test/SampleExtensions.php b/test/SampleExtensions.php deleted file mode 100644 index e855c71..0000000 --- a/test/SampleExtensions.php +++ /dev/null @@ -1,40 +0,0 @@ -$text"; - - return $Block; - } -} - - -class TrustDelegatedExtension extends Parsedown -{ - protected function blockFencedCodeComplete($Block) - { - $text = $Block['element']['element']['text']; - unset($Block['element']['element']['text']); - - // WARNING: There is almost always a better way of doing things! - // - // This behaviour is NOT needed in the demonstrated case. - // Only use this if you are sure that the result being added into - // rawHtml is safe. - // (e.g. using an external parser with escaping capabilities). - $Block['element']['element']['rawHtml'] = "$text
"; - $Block['element']['element']['allowRawHtmlInSafeMode'] = true; - - return $Block; - } -} diff --git a/test/TestParsedown.php b/test/TestParsedown.php deleted file mode 100644 index 2faa0ab..0000000 --- a/test/TestParsedown.php +++ /dev/null @@ -1,9 +0,0 @@ -textLevelElements; - } -} diff --git a/test/data/aesthetic_table.html b/test/data/aesthetic_table.html deleted file mode 100644 index 88e1c2b..0000000 --- a/test/data/aesthetic_table.html +++ /dev/null @@ -1,18 +0,0 @@ -header 1 | -header 2 | -
---|---|
cell 1.1 | -cell 1.2 | -
cell 2.1 | -cell 2.2 | -
header 1 | -header 2 | -header 2 | -
---|---|---|
cell 1.1 | -cell 1.2 | -cell 1.3 | -
cell 2.1 | -cell 2.2 | -cell 2.3 | -
####### not a heading
-paragraph
-<?php
-
-$message = 'Hello World!';
-echo $message;
-> not a quote
-- not a list item
-[not a reference]: http://foo.com
-foo
-
-
-bar
\ No newline at end of file
diff --git a/test/data/code_block.md b/test/data/code_block.md
deleted file mode 100644
index badf873..0000000
--- a/test/data/code_block.md
+++ /dev/null
@@ -1,17 +0,0 @@
- not a quote
- - not a list item
- [not a reference]: http://foo.com
-
----
-
- foo
-
-
- bar
\ No newline at end of file
diff --git a/test/data/code_span.html b/test/data/code_span.html
deleted file mode 100644
index 5c4c231..0000000
--- a/test/data/code_span.html
+++ /dev/null
@@ -1,6 +0,0 @@
-a code span
this is also a codespan
trailing text
and look at this one!
single backtick in a code span: `
backtick-delimited string in a code span: `foo`
sth `` sth
-\ No newline at end of file diff --git a/test/data/compound_blockquote.md b/test/data/compound_blockquote.md deleted file mode 100644 index 80c4aed..0000000 --- a/test/data/compound_blockquote.md +++ /dev/null @@ -1,10 +0,0 @@ -> header -> ------ -> -> paragraph -> -> - li -> -> --- -> -> paragraph \ No newline at end of file diff --git a/test/data/compound_emphasis.html b/test/data/compound_emphasis.html deleted file mode 100644 index 178dd54..0000000 --- a/test/data/compound_emphasis.html +++ /dev/null @@ -1,2 +0,0 @@ -header
-paragraph
--
-- li
-
-paragraph
-
code
code
code
code
code
paragraph
-paragraph
-paragraph
---quote
-
em strong
-em strong strong
-strong em strong
-strong em strong strong
-em strong
-em strong strong
-strong em strong
-strong em strong strong
\ No newline at end of file diff --git a/test/data/em_strong.md b/test/data/em_strong.md deleted file mode 100644 index 9abeb3f..0000000 --- a/test/data/em_strong.md +++ /dev/null @@ -1,15 +0,0 @@ -___em strong___ - -___em strong_ strong__ - -__strong _em strong___ - -__strong _em strong_ strong__ - -***em strong*** - -***em strong* strong** - -**strong *em strong*** - -**strong *em strong* strong** \ No newline at end of file diff --git a/test/data/email.html b/test/data/email.html deleted file mode 100644 index 93e0705..0000000 --- a/test/data/email.html +++ /dev/null @@ -1,2 +0,0 @@ -my email is me@example.com
-html tags shouldn't start an email autolink first.last@example.com
\ No newline at end of file diff --git a/test/data/email.md b/test/data/email.md deleted file mode 100644 index 00b6969..0000000 --- a/test/data/email.md +++ /dev/null @@ -1,3 +0,0 @@ -my email isunderscore, asterisk, one two, three four, a, b
-strong and em and strong and em
-line -line -line
-this_is_not_an_emphasis
-an empty emphasis __ ** is not an emphasis
-*mixed *double and single asterisk** spans
\ No newline at end of file diff --git a/test/data/emphasis.md b/test/data/emphasis.md deleted file mode 100644 index 85b9d22..0000000 --- a/test/data/emphasis.md +++ /dev/null @@ -1,13 +0,0 @@ -_underscore_, *asterisk*, _one two_, *three four*, _a_, *b* - -**strong** and *em* and **strong** and *em* - -_line -line -line_ - -this_is_not_an_emphasis - -an empty emphasis __ ** is not an emphasis - -*mixed **double and* single asterisk** spans \ No newline at end of file diff --git a/test/data/escaping.html b/test/data/escaping.html deleted file mode 100644 index ab1c41f..0000000 --- a/test/data/escaping.html +++ /dev/null @@ -1,6 +0,0 @@ -escaped *emphasis*.
-escaped \*emphasis\* in a code span
escaped \*emphasis\* in a code block
-\ ` * _ { } [ ] ( ) > # + - . !
-one_two one_two
-one*two one*two
\ No newline at end of file diff --git a/test/data/escaping.md b/test/data/escaping.md deleted file mode 100644 index 9f174e9..0000000 --- a/test/data/escaping.md +++ /dev/null @@ -1,11 +0,0 @@ -escaped \*emphasis\*. - -`escaped \*emphasis\* in a code span` - - escaped \*emphasis\* in a code block - -\\ \` \* \_ \{ \} \[ \] \( \) \> \# \+ \- \. \! - -_one\_two_ __one\_two__ - -*one\*two* **one\*two** \ No newline at end of file diff --git a/test/data/fenced_code_block.html b/test/data/fenced_code_block.html deleted file mode 100644 index 50d39df..0000000 --- a/test/data/fenced_code_block.html +++ /dev/null @@ -1,18 +0,0 @@ -<?php
-
-$message = 'fenced code block';
-echo $message;
-tilde
-echo 'language identifier';
-echo 'language identifier with non words';
-<?php
-echo "Hello World";
-?>
-<a href="http://auraphp.com" >Aura Project</a>
-the following isn't quite enough to close
-```
-still a fenced code block
-foo
-
-
-bar
\ No newline at end of file
diff --git a/test/data/fenced_code_block.md b/test/data/fenced_code_block.md
deleted file mode 100644
index 3e4155a..0000000
--- a/test/data/fenced_code_block.md
+++ /dev/null
@@ -1,38 +0,0 @@
-```
-
-Aura Project
-```
-
-````
-the following isn't quite enough to close
-```
-still a fenced code block
-````
-
-```
-foo
-
-
-bar
-```
\ No newline at end of file
diff --git a/test/data/horizontal_rule.html b/test/data/horizontal_rule.html
deleted file mode 100644
index 68da03d..0000000
--- a/test/data/horizontal_rule.html
+++ /dev/null
@@ -1,5 +0,0 @@
-paragraph
- -paragraph
-abc -& © {
\ No newline at end of file diff --git a/test/data/html_entity.md b/test/data/html_entity.md deleted file mode 100644 index ff545ea..0000000 --- a/test/data/html_entity.md +++ /dev/null @@ -1 +0,0 @@ -& © { \ No newline at end of file diff --git a/test/data/image_reference.html b/test/data/image_reference.html deleted file mode 100644 index 67fbd2c..0000000 --- a/test/data/image_reference.html +++ /dev/null @@ -1,2 +0,0 @@ -![missing reference]
\ No newline at end of file diff --git a/test/data/image_reference.md b/test/data/image_reference.md deleted file mode 100644 index 1e11d94..0000000 --- a/test/data/image_reference.md +++ /dev/null @@ -1,5 +0,0 @@ -![Markdown Logo][image] - -[image]: /md.png - -![missing reference] \ No newline at end of file diff --git a/test/data/image_title.html b/test/data/image_title.html deleted file mode 100644 index 957c950..0000000 --- a/test/data/image_title.html +++ /dev/null @@ -1,2 +0,0 @@ -an implicit reference link
-an implicit reference link with an empty link definition
-an implicit reference link followed by another
-an explicit reference link with a title
\ No newline at end of file diff --git a/test/data/implicit_reference.md b/test/data/implicit_reference.md deleted file mode 100644 index f850df9..0000000 --- a/test/data/implicit_reference.md +++ /dev/null @@ -1,13 +0,0 @@ -an [implicit] reference link - -[implicit]: http://example.com - -an [implicit][] reference link with an empty link definition - -an [implicit][] reference link followed by [another][] - -[another]: http://cnn.com - -an [explicit][example] reference link with a title - -[example]: http://example.com "Example" \ No newline at end of file diff --git a/test/data/inline_link.html b/test/data/inline_link.html deleted file mode 100644 index cef29cf..0000000 --- a/test/data/inline_link.html +++ /dev/null @@ -1,7 +0,0 @@ - -link with parentheses in URL
-(link) in parentheses
- - - - \ No newline at end of file diff --git a/test/data/inline_link.md b/test/data/inline_link.md deleted file mode 100644 index 1ba24b7..0000000 --- a/test/data/inline_link.md +++ /dev/null @@ -1,13 +0,0 @@ -[link](http://example.com) - -[link](/url-(parentheses)) with parentheses in URL - -([link](/index.php)) in parentheses - -[`link`](http://example.com) - -[![MD Logo](http://parsedown.org/md.png)](http://example.com) - -[![MD Logo](http://parsedown.org/md.png) and text](http://example.com) - -[![MD Logo](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAUCAYAAADskT9PAAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnOGbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAwFJlfzOcmoWyJMkUUGe6J8gIACJTEObxyDov5OWieAHimZ+SKBIlJYqYR15hp5ejIZvrxs1P5YjErlMNN4Yh4TM/0tAyOMBeAr2+WRQElWW2ZaJHtrRzt7VnW5mj5v9nfHn5T/T3IevtV8Sbsz55BjJ5Z32zsrC+9FgD2JFqbHbO+lVUAtG0GQOXhrE/vIADyBQC03pzzHoZsXpLE4gwnC4vs7GxzAZ9rLivoN/ufgm/Kv4Y595nL7vtWO6YXP4EjSRUzZUXlpqemS0TMzAwOl89k/fcQ/+PAOWnNycMsnJ/AF/GF6FVR6JQJhIlou4U8gViQLmQKhH/V4X8YNicHGX6daxRodV8AfYU5ULhJB8hvPQBDIwMkbj96An3rWxAxCsi+vGitka9zjzJ6/uf6Hwtcim7hTEEiU+b2DI9kciWiLBmj34RswQISkAd0oAo0gS4wAixgDRyAM3AD3iAAhIBIEAOWAy5IAmlABLJBPtgACkEx2AF2g2pwANSBetAEToI2cAZcBFfADXALDIBHQAqGwUswAd6BaQiC8BAVokGqkBakD5lC1hAbWgh5Q0FQOBQDxUOJ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H4aPQydMtB8gQdAFLU3t5+DRjsWSAMYoPEcAFOTs5EoNw+NPl9UHE0YQYGglEA09HR0bEAxsZHA0PnFzAqgoBq9gIxKOrOAnEQSBxIYwCiQgBDFwEBYFB/BEaVJ7AQ2wGiQXxcWhhhJRZQ0UBURsSlAVyup4Y4TaKAFIeBouAJUIM0KZqoqPYpEzBrpQANfEFFQ4k16gXIbgCggnKoJ5DJdwAAAABJRU5ErkJggg==) and text](http://example.com) \ No newline at end of file diff --git a/test/data/inline_link_title.html b/test/data/inline_link_title.html deleted file mode 100644 index ecdfd03..0000000 --- a/test/data/inline_link_title.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/test/data/inline_link_title.md b/test/data/inline_link_title.md deleted file mode 100644 index 6e1c5af..0000000 --- a/test/data/inline_link_title.md +++ /dev/null @@ -1,11 +0,0 @@ -[single quotes](http://example.com 'Title') - -[double quotes](http://example.com "Title") - -[single quotes blank](http://example.com '') - -[double quotes blank](http://example.com "") - -[space](http://example.com "2 Words") - -[parentheses](http://example.com/url-(parentheses) "Title") \ No newline at end of file diff --git a/test/data/inline_title.html b/test/data/inline_title.html deleted file mode 100644 index bbab93b..0000000 --- a/test/data/inline_title.html +++ /dev/null @@ -1 +0,0 @@ -single quotes and double quotes
\ No newline at end of file diff --git a/test/data/inline_title.md b/test/data/inline_title.md deleted file mode 100644 index cb09344..0000000 --- a/test/data/inline_title.md +++ /dev/null @@ -1 +0,0 @@ -[single quotes](http://example.com 'Example') and [double quotes](http://example.com "Example") \ No newline at end of file diff --git a/test/data/lazy_blockquote.html b/test/data/lazy_blockquote.html deleted file mode 100644 index dea3dca..0000000 --- a/test/data/lazy_blockquote.html +++ /dev/null @@ -1,8 +0,0 @@ ---quote -the rest of it
-
-\ No newline at end of file diff --git a/test/data/lazy_blockquote.md b/test/data/lazy_blockquote.md deleted file mode 100644 index 48f645f..0000000 --- a/test/data/lazy_blockquote.md +++ /dev/null @@ -1,5 +0,0 @@ -> quote -the rest of it - -> another paragraph -the rest of it \ No newline at end of file diff --git a/test/data/lazy_list.html b/test/data/lazy_list.html deleted file mode 100644 index 1a51992..0000000 --- a/test/data/lazy_list.html +++ /dev/null @@ -1,4 +0,0 @@ -another paragraph -the rest of it
-
line
-line
Markdown
\ No newline at end of file diff --git a/test/data/markup_consecutive_one.md b/test/data/markup_consecutive_one.md deleted file mode 100644 index 18b4dcb..0000000 --- a/test/data/markup_consecutive_one.md +++ /dev/null @@ -1,4 +0,0 @@ -Markdown
\ No newline at end of file diff --git a/test/data/markup_consecutive_one_line.md b/test/data/markup_consecutive_one_line.md deleted file mode 100644 index daf945a..0000000 --- a/test/data/markup_consecutive_one_line.md +++ /dev/null @@ -1,5 +0,0 @@ -Stripped markup
Markdown
\ No newline at end of file diff --git a/test/data/markup_consecutive_one_stripped.md b/test/data/markup_consecutive_one_stripped.md deleted file mode 100644 index 7f8df0c..0000000 --- a/test/data/markup_consecutive_one_stripped.md +++ /dev/null @@ -1,4 +0,0 @@ -Stripped markup
and second markup on the same line.
-_No markdown_ -Markdown
\ No newline at end of file diff --git a/test/data/markup_consecutive_two.md b/test/data/markup_consecutive_two.md deleted file mode 100644 index 83f3af7..0000000 --- a/test/data/markup_consecutive_two.md +++ /dev/null @@ -1,4 +0,0 @@ -and second markup on the same line.
-_No markdown_ - -**Markdown** \ No newline at end of file diff --git a/test/data/markup_consecutive_two_lines.html b/test/data/markup_consecutive_two_lines.html deleted file mode 100644 index ffa4728..0000000 --- a/test/data/markup_consecutive_two_lines.html +++ /dev/null @@ -1,4 +0,0 @@ -and partial markup -on two lines.
-_No markdown_ -Markdown
\ No newline at end of file diff --git a/test/data/markup_consecutive_two_lines.md b/test/data/markup_consecutive_two_lines.md deleted file mode 100644 index dc70bb7..0000000 --- a/test/data/markup_consecutive_two_lines.md +++ /dev/null @@ -1,5 +0,0 @@ -and partial markup -on two lines.
-_No markdown_ - -**Markdown** \ No newline at end of file diff --git a/test/data/markup_consecutive_two_stripped.html b/test/data/markup_consecutive_two_stripped.html deleted file mode 100644 index 707d6be..0000000 --- a/test/data/markup_consecutive_two_stripped.html +++ /dev/null @@ -1,4 +0,0 @@ -Stripped markup -on two lines
Markdown
\ No newline at end of file diff --git a/test/data/markup_consecutive_two_stripped.md b/test/data/markup_consecutive_two_stripped.md deleted file mode 100644 index af5b781..0000000 --- a/test/data/markup_consecutive_two_stripped.md +++ /dev/null @@ -1,5 +0,0 @@ -Stripped markup -on two lines
li
-line -line
-One -First body copy
-Two -Last body copy
--_adopted child_ --
outside
\ No newline at end of file diff --git a/test/data/nested_block-level_html.md b/test/data/nested_block-level_html.md deleted file mode 100644 index 5e01e10..0000000 --- a/test/data/nested_block-level_html.md +++ /dev/null @@ -1,11 +0,0 @@ --_adopted child_ --
repeating numbers:
-large numbers:
-foo 1. the following should not start a list
-100.
-200.
paragraph
-paragraph
-li
-li
-double quotes and single quotes and parentheses
-[invalid title]: http://example.com example title
\ No newline at end of file diff --git a/test/data/reference_title.md b/test/data/reference_title.md deleted file mode 100644 index 43cb217..0000000 --- a/test/data/reference_title.md +++ /dev/null @@ -1,6 +0,0 @@ -[double quotes] and [single quotes] and [parentheses] - -[double quotes]: http://example.com "example title" -[single quotes]: http://example.com 'example title' -[parentheses]: http://example.com (example title) -[invalid title]: http://example.com example title \ No newline at end of file diff --git a/test/data/self-closing_html.html b/test/data/self-closing_html.html deleted file mode 100644 index 4d072b4..0000000 --- a/test/data/self-closing_html.html +++ /dev/null @@ -1,12 +0,0 @@ -paragraph
-paragraph
-paragraph
-paragraph
-paragraph
-paragraph
\ No newline at end of file diff --git a/test/data/self-closing_html.md b/test/data/self-closing_html.md deleted file mode 100644 index 61d16a3..0000000 --- a/test/data/self-closing_html.md +++ /dev/null @@ -1,18 +0,0 @@ -li
-not a header
-too many leading spaces -==
-too many leading spaces ---
\ No newline at end of file diff --git a/test/data/setext_header_spaces.md b/test/data/setext_header_spaces.md deleted file mode 100644 index 4ac35bb..0000000 --- a/test/data/setext_header_spaces.md +++ /dev/null @@ -1,29 +0,0 @@ -trailing space -== - -trailing space --- - -leading and trailing space - == - -leading and trailing space - -- - -1 leading space - == - -1 leading space - -- - -3 leading spaces - == - -3 leading spaces - -- - -too many leading spaces - == - -too many leading spaces - -- \ No newline at end of file diff --git a/test/data/simple_blockquote.html b/test/data/simple_blockquote.html deleted file mode 100644 index 9f9bfab..0000000 --- a/test/data/simple_blockquote.html +++ /dev/null @@ -1,26 +0,0 @@ ---quote
-
indented:
---quote
-
no space after >
:
--quote
-
------Info 1 text
-
-\ No newline at end of file diff --git a/test/data/simple_blockquote.md b/test/data/simple_blockquote.md deleted file mode 100644 index d7c3e12..0000000 --- a/test/data/simple_blockquote.md +++ /dev/null @@ -1,13 +0,0 @@ -> quote - -indented: - > quote - -no space after `>`: ->quote - ---- - ->>> Info 1 text - ->>> Info 2 text \ No newline at end of file diff --git a/test/data/simple_table.html b/test/data/simple_table.html deleted file mode 100644 index b74a2ec..0000000 --- a/test/data/simple_table.html +++ /dev/null @@ -1,75 +0,0 @@ -----Info 2 text
-
header 1 | -header 2 | -
---|---|
cell 1.1 | -cell 1.2 | -
cell 2.1 | -cell 2.2 | -
header 1 | -header 2 | -
---|---|
cell 1.1 | -cell 1.2 | -
cell 2.1 | -cell 2.2 | -
header 1 | -
---|
cell 1.1 | -
cell 2.1 | -
header 1 | -
---|
cell 1.1 | -
cell 2.1 | -
Not a table, we haven't ended the paragraph: -header 1 | header 2 --------- | -------- -cell 1.1 | cell 1.2 -cell 2.1 | cell 2.2
\ No newline at end of file diff --git a/test/data/simple_table.md b/test/data/simple_table.md deleted file mode 100644 index 42eff5a..0000000 --- a/test/data/simple_table.md +++ /dev/null @@ -1,33 +0,0 @@ -header 1 | header 2 --------- | -------- -cell 1.1 | cell 1.2 -cell 2.1 | cell 2.2 - ---- - -header 1 | header 2 -:------- | -------- -cell 1.1 | cell 1.2 -cell 2.1 | cell 2.2 - ---- - -header 1 -:------- -cell 1.1 -cell 2.1 - ---- - -header 1 --------| -cell 1.1 -cell 2.1 - ---- - -Not a table, we haven't ended the paragraph: -header 1 | header 2 --------- | -------- -cell 1.1 | cell 1.2 -cell 2.1 | cell 2.2 \ No newline at end of file diff --git a/test/data/span-level_html.html b/test/data/span-level_html.html deleted file mode 100644 index f852a25..0000000 --- a/test/data/span-level_html.html +++ /dev/null @@ -1,5 +0,0 @@ -an important link
-broken
-line
inline tag at the beginning
- \ No newline at end of file diff --git a/test/data/span-level_html.md b/test/data/span-level_html.md deleted file mode 100644 index f221965..0000000 --- a/test/data/span-level_html.md +++ /dev/null @@ -1,8 +0,0 @@ -an important link - -brokenli
-li
-li
-line 2 -line 3
-line 4
-li
-li
-li
-AT&T has an ampersand in their name
-this & that
-4 < 5 and 6 > 5
-http://example.com/autolink?a=1&b=2
- - \ No newline at end of file diff --git a/test/data/special_characters.md b/test/data/special_characters.md deleted file mode 100644 index 111b03b..0000000 --- a/test/data/special_characters.md +++ /dev/null @@ -1,13 +0,0 @@ -AT&T has an ampersand in their name - -this & that - -4 < 5 and 6 > 5 - -####### not a heading
-#not a heading
-strikethrough
here's one followed by another one
~~ this ~~ is not one neither is ~this~
-escaped ~~this~~
\ No newline at end of file diff --git a/test/data/strikethrough.md b/test/data/strikethrough.md deleted file mode 100644 index 83d5b35..0000000 --- a/test/data/strikethrough.md +++ /dev/null @@ -1,7 +0,0 @@ -~~strikethrough~~ - -here's ~~one~~ followed by ~~another one~~ - -~~ this ~~ is not one neither is ~this~ - -escaped \~\~this\~\~ \ No newline at end of file diff --git a/test/data/strong_em.html b/test/data/strong_em.html deleted file mode 100644 index b709c99..0000000 --- a/test/data/strong_em.html +++ /dev/null @@ -1,6 +0,0 @@ -em strong em
-strong em em
-em strong em em
-em strong em
-strong em em
-em strong em em
\ No newline at end of file diff --git a/test/data/strong_em.md b/test/data/strong_em.md deleted file mode 100644 index f2aa3c7..0000000 --- a/test/data/strong_em.md +++ /dev/null @@ -1,11 +0,0 @@ -*em **strong em*** - -***strong em** em* - -*em **strong em** em* - -_em __strong em___ - -___strong em__ em_ - -_em __strong em__ em_ \ No newline at end of file diff --git a/test/data/tab-indented_code_block.html b/test/data/tab-indented_code_block.html deleted file mode 100644 index 7c140de..0000000 --- a/test/data/tab-indented_code_block.html +++ /dev/null @@ -1,6 +0,0 @@ -<?php
-
-$message = 'Hello World!';
-echo $message;
-
-echo "following a blank line";
\ No newline at end of file
diff --git a/test/data/tab-indented_code_block.md b/test/data/tab-indented_code_block.md
deleted file mode 100644
index a405a16..0000000
--- a/test/data/tab-indented_code_block.md
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-|
2.1\|
2.1one with a semantic name
-[one][404] with no definition
-multiline -one defined on 2 lines
-one with a mixed case label and an upper case definition
-one with the a label on the next line
- \ No newline at end of file diff --git a/test/data/text_reference.md b/test/data/text_reference.md deleted file mode 100644 index 1a66a5c..0000000 --- a/test/data/text_reference.md +++ /dev/null @@ -1,21 +0,0 @@ -[reference link][1] - -[1]: http://example.com - -[one][website] with a semantic name - -[website]: http://example.com - -[one][404] with no definition - -[multiline -one][website] defined on 2 lines - -[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] \ No newline at end of file diff --git a/test/data/unordered_list.html b/test/data/unordered_list.html deleted file mode 100644 index 6ed70a6..0000000 --- a/test/data/unordered_list.html +++ /dev/null @@ -1,22 +0,0 @@ -mixed unordered markers:
-mixed ordered markers:
-header 1 | -header 2 | -
---|---|
cell 1.1 | -cell 1.2 | -
cell 2.1 | -cell 2.2 | -
an autolink http://example.com
-inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com)
-trailing slash http://example.com/ and http://example.com/path/
\ No newline at end of file diff --git a/test/data/url_autolinking.md b/test/data/url_autolinking.md deleted file mode 100644 index 840f354..0000000 --- a/test/data/url_autolinking.md +++ /dev/null @@ -1,5 +0,0 @@ -an autolink http://example.com - -inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com) - -trailing slash http://example.com/ and http://example.com/path/ \ No newline at end of file diff --git a/test/data/whitespace.html b/test/data/whitespace.html deleted file mode 100644 index f2dd7a0..0000000 --- a/test/data/whitespace.html +++ /dev/null @@ -1 +0,0 @@ -code
\ No newline at end of file
diff --git a/test/data/whitespace.md b/test/data/whitespace.md
deleted file mode 100644
index 4cf926a..0000000
--- a/test/data/whitespace.md
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- code
-
-
\ No newline at end of file
diff --git a/test/data/xss_attribute_encoding.html b/test/data/xss_attribute_encoding.html
deleted file mode 100644
index 287ff51..0000000
--- a/test/data/xss_attribute_encoding.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-<script>alert(1)</script>
-<script>
-alert(1)
-</script>
-<script> -alert(1) -</script>
\ No newline at end of file diff --git a/test/data/xss_text_encoding.md b/test/data/xss_text_encoding.md deleted file mode 100644 index b1051a2..0000000 --- a/test/data/xss_text_encoding.md +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file