Bläddra i källkod

test: add karlcow's testsuite

Also refactor tests to improve maintainability
Estevao Soares dos Santos 10 år sedan
förälder
incheckning
42240ba82c
100 ändrade filer med 363 tillägg och 4 borttagningar
  1. 9 0
      Gruntfile.js
  2. 2 2
      dist/showdown.js
  3. 0 0
      dist/showdown.js.map
  4. 1 1
      dist/showdown.min.js
  5. 0 0
      dist/showdown.min.js.map
  6. 1 0
      package.json
  7. 1 1
      src/subParsers/images.js
  8. 89 0
      test/bootstrap.js
  9. 5 0
      test/karlcow/2-paragraphs-hard-return-spaces.html
  10. 5 0
      test/karlcow/2-paragraphs-hard-return-spaces.md
  11. 5 0
      test/karlcow/2-paragraphs-hard-return.html
  12. 5 0
      test/karlcow/2-paragraphs-hard-return.md
  13. 3 0
      test/karlcow/2-paragraphs-line-returns.html
  14. 5 0
      test/karlcow/2-paragraphs-line-returns.md
  15. 3 0
      test/karlcow/2-paragraphs-line-spaces.html
  16. 3 0
      test/karlcow/2-paragraphs-line-spaces.md
  17. 3 0
      test/karlcow/2-paragraphs-line-tab.html
  18. 3 0
      test/karlcow/2-paragraphs-line-tab.md
  19. 3 0
      test/karlcow/2-paragraphs-line.html
  20. 3 0
      test/karlcow/2-paragraphs-line.md
  21. 5 0
      test/karlcow/EOL-CR+LF.html
  22. 6 0
      test/karlcow/EOL-CR+LF.md
  23. 1 0
      test/karlcow/EOL-CR.html
  24. 1 0
      test/karlcow/EOL-CR.md
  25. 5 0
      test/karlcow/EOL-LF.html
  26. 6 0
      test/karlcow/EOL-LF.md
  27. 1 0
      test/karlcow/ampersand-text-flow.html
  28. 1 0
      test/karlcow/ampersand-text-flow.md
  29. 1 0
      test/karlcow/ampersand-uri.html
  30. 1 0
      test/karlcow/ampersand-uri.md
  31. 1 0
      test/karlcow/asterisk-near-text.html
  32. 1 0
      test/karlcow/asterisk-near-text.md
  33. 1 0
      test/karlcow/asterisk.html
  34. 1 0
      test/karlcow/asterisk.md
  35. 12 0
      test/karlcow/backslash-escape.html
  36. 12 0
      test/karlcow/backslash-escape.md
  37. 5 0
      test/karlcow/blockquote-added-markup.html
  38. 3 0
      test/karlcow/blockquote-added-markup.md
  39. 5 0
      test/karlcow/blockquote-line-2-paragraphs.html
  40. 3 0
      test/karlcow/blockquote-line-2-paragraphs.md
  41. 3 0
      test/karlcow/blockquote-line.html
  42. 1 0
      test/karlcow/blockquote-line.md
  43. 5 0
      test/karlcow/blockquote-multiline-1-space-begin.html
  44. 3 0
      test/karlcow/blockquote-multiline-1-space-begin.md
  45. 5 0
      test/karlcow/blockquote-multiline-1-space-end.html
  46. 3 0
      test/karlcow/blockquote-multiline-1-space-end.md
  47. 8 0
      test/karlcow/blockquote-multiline-2-paragraphs.html
  48. 6 0
      test/karlcow/blockquote-multiline-2-paragraphs.md
  49. 5 0
      test/karlcow/blockquote-multiline.html
  50. 3 0
      test/karlcow/blockquote-multiline.md
  51. 9 0
      test/karlcow/blockquote-nested-multiplereturn-level1.html
  52. 5 0
      test/karlcow/blockquote-nested-multiplereturn-level1.md
  53. 7 0
      test/karlcow/blockquote-nested-multiplereturn.html
  54. 3 0
      test/karlcow/blockquote-nested-multiplereturn.md
  55. 8 0
      test/karlcow/blockquote-nested-return-level1.html
  56. 3 0
      test/karlcow/blockquote-nested-return-level1.md
  57. 7 0
      test/karlcow/blockquote-nested.html
  58. 2 0
      test/karlcow/blockquote-nested.md
  59. 3 0
      test/karlcow/code-1-tab.html
  60. 2 0
      test/karlcow/code-1-tab.md
  61. 3 0
      test/karlcow/code-4-spaces-escaping.html
  62. 2 0
      test/karlcow/code-4-spaces-escaping.md
  63. 3 0
      test/karlcow/code-4-spaces.html
  64. 2 0
      test/karlcow/code-4-spaces.md
  65. 1 0
      test/karlcow/em-middle-word.html
  66. 1 0
      test/karlcow/em-middle-word.md
  67. 1 0
      test/karlcow/em-star.html
  68. 1 0
      test/karlcow/em-star.md
  69. 1 0
      test/karlcow/em-underscore.html
  70. 1 0
      test/karlcow/em-underscore.md
  71. 1 0
      test/karlcow/entities-text-flow.html
  72. 1 0
      test/karlcow/entities-text-flow.md
  73. 1 0
      test/karlcow/header-level1-equal-underlined.html
  74. 2 0
      test/karlcow/header-level1-equal-underlined.md
  75. 1 0
      test/karlcow/header-level1-hash-sign-closed.html
  76. 1 0
      test/karlcow/header-level1-hash-sign-closed.md
  77. 1 0
      test/karlcow/header-level1-hash-sign-trailing-1-space.html
  78. 1 0
      test/karlcow/header-level1-hash-sign-trailing-1-space.md
  79. 3 0
      test/karlcow/header-level1-hash-sign-trailing-2-spaces.html
  80. 2 0
      test/karlcow/header-level1-hash-sign-trailing-2-spaces.md
  81. 1 0
      test/karlcow/header-level1-hash-sign.html
  82. 1 0
      test/karlcow/header-level1-hash-sign.md
  83. 1 0
      test/karlcow/header-level2-dash-underlined.html
  84. 2 0
      test/karlcow/header-level2-dash-underlined.md
  85. 1 0
      test/karlcow/header-level2-hash-sign-closed.html
  86. 1 0
      test/karlcow/header-level2-hash-sign-closed.md
  87. 1 0
      test/karlcow/header-level2-hash-sign.html
  88. 1 0
      test/karlcow/header-level2-hash-sign.md
  89. 1 0
      test/karlcow/header-level3-hash-sign-closed.html
  90. 1 0
      test/karlcow/header-level3-hash-sign-closed.md
  91. 1 0
      test/karlcow/header-level3-hash-sign.html
  92. 1 0
      test/karlcow/header-level3-hash-sign.md
  93. 1 0
      test/karlcow/header-level4-hash-sign-closed.html
  94. 1 0
      test/karlcow/header-level4-hash-sign-closed.md
  95. 1 0
      test/karlcow/header-level4-hash-sign.html
  96. 1 0
      test/karlcow/header-level4-hash-sign.md
  97. 1 0
      test/karlcow/header-level5-hash-sign-closed.html
  98. 1 0
      test/karlcow/header-level5-hash-sign-closed.md
  99. 1 0
      test/karlcow/header-level5-hash-sign.html
  100. 1 0
      test/karlcow/header-level5-hash-sign.md

+ 9 - 0
Gruntfile.js

@@ -95,6 +95,15 @@ module.exports = function (grunt) {
           reporter: 'spec'
         }
       },
+      karlcow: {
+        src: 'test/node/testsuite.karlcow.js',
+        options: {
+          globals: ['should'],
+          timeout: 3000,
+          ignoreLeaks: false,
+          reporter: 'spec'
+        }
+      },
       browser: {
         src: 'test/browser/**/*.js',
         options: {

+ 2 - 2
dist/showdown.js

@@ -1,4 +1,4 @@
-;/*! showdown 08-06-2015 */
+;/*! showdown 11-06-2015 */
 (function(){
 /**
  * Created by Tivie on 06-01-2015.
@@ -1543,7 +1543,7 @@ showdown.subParser('images', function (text, options, globals) {
     url = showdown.helper.escapeCharacters(url, '*_', false);
     var result = '<img src="' + url + '" alt="' + altText + '"';
 
-    if (title != "") {
+    if (title) {
       title = title.replace(/"/g, '&quot;');
       title = showdown.helper.escapeCharacters(title, '*_', false);
       result += ' title="' + title + '"';

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/showdown.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/showdown.min.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/showdown.min.js.map


+ 1 - 0
package.json

@@ -45,6 +45,7 @@
     "grunt-conventional-changelog": "^1.1.0",
     "grunt-jscs": "^1.2.0",
     "grunt-simple-mocha": "^0.4.0",
+    "js-beautify": "^1.5.6",
     "jscs": "^1.10.0",
     "load-grunt-tasks": "^3.2.0",
     "mocha": "*",

+ 1 - 1
src/subParsers/images.js

@@ -39,7 +39,7 @@ showdown.subParser('images', function (text, options, globals) {
     url = showdown.helper.escapeCharacters(url, '*_', false);
     var result = '<img src="' + url + '" alt="' + altText + '"';
 
-    if (title != "") {
+    if (title) {
       title = title.replace(/"/g, '&quot;');
       title = showdown.helper.escapeCharacters(title, '*_', false);
       result += ' title="' + title + '"';

+ 89 - 0
test/bootstrap.js

@@ -0,0 +1,89 @@
+/**
+ * Created by Estevao on 08-06-2015.
+ */
+
+//jscs:disable requireCamelCaseOrUpperCaseIdentifiers
+require('source-map-support').install();
+require('chai').should();
+var fs = require('fs'),
+    os = require('os'),
+    beautify = require('js-beautify').html_beautify,
+    beauOptions = {
+      eol: os.EOL,
+      indent_size: 2,
+      preserve_newlines: false
+    };
+
+function getTestSuite(dir) {
+  return fs.readdirSync(dir)
+    .filter(filter())
+    .map(map(dir));
+}
+
+function filter() {
+  return function (file) {
+    var ext = file.slice(-3);
+    return (ext === '.md');
+  };
+}
+
+function map(dir) {
+  return function (file) {
+    var name = file.replace('.md', ''),
+      htmlPath = dir + name + '.html',
+      html = fs.readFileSync(htmlPath, 'utf8'),
+      mdPath = dir + name + '.md',
+      md = fs.readFileSync(mdPath, 'utf8');
+
+    return {
+      name:     name,
+      input:    md,
+      expected: html
+    };
+  };
+}
+
+function assertion(testCase, converter) {
+  return function () {
+    testCase.actual = converter.makeHtml(testCase.input);
+    testCase = normalize(testCase);
+
+    // Compare
+    testCase.actual.should.equal(testCase.expected);
+  };
+}
+
+//Normalize input/output
+function normalize(testCase) {
+
+  // Normalize line returns
+  testCase.expected = testCase.expected.replace(/(\r\n)|\n|\r/g, '\n');
+  testCase.actual = testCase.actual.replace(/(\r\n)|\n|\r/g, '\n');
+
+  // Ignore all leading/trailing whitespace
+  testCase.expected = testCase.expected.split('\n').map(function (x) {
+    return x.trim();
+  }).join('\n');
+  testCase.actual = testCase.actual.split('\n').map(function (x) {
+    return x.trim();
+  }).join('\n');
+
+  // Remove extra lines
+  testCase.expected = testCase.expected.trim();
+  testCase.actual = testCase.actual.trim();
+
+  //Beautify
+  testCase.expected = beautify(testCase.expected, beauOptions);
+  testCase.actual = beautify(testCase.actual, beauOptions);
+
+  // Normalize line returns
+  testCase.expected = testCase.expected.replace(/(\r\n)|\n|\r/g, os.EOL);
+  testCase.actual = testCase.actual.replace(/(\r\n)|\n|\r/g, os.EOL);
+
+  return testCase;
+}
+
+module.exports = {
+  getTestSuite: getTestSuite,
+  assertion: assertion
+};

+ 5 - 0
test/karlcow/2-paragraphs-hard-return-spaces.html

@@ -0,0 +1,5 @@
+<p>This is a first paragraph,
+on multiple lines.</p>
+
+<p>This is a second paragraph.
+There are spaces in between the two.</p>

+ 5 - 0
test/karlcow/2-paragraphs-hard-return-spaces.md

@@ -0,0 +1,5 @@
+This is a first paragraph,
+on multiple lines.
+     
+This is a second paragraph.
+There are spaces in between the two.

+ 5 - 0
test/karlcow/2-paragraphs-hard-return.html

@@ -0,0 +1,5 @@
+<p>This is a first paragraph,
+on multiple lines.</p>
+
+<p>This is a second paragraph
+which has multiple lines too.</p>

+ 5 - 0
test/karlcow/2-paragraphs-hard-return.md

@@ -0,0 +1,5 @@
+This is a first paragraph,
+on multiple lines.
+
+This is a second paragraph
+which has multiple lines too.

+ 3 - 0
test/karlcow/2-paragraphs-line-returns.html

@@ -0,0 +1,3 @@
+<p>A first paragraph.</p>
+
+<p>A second paragraph after 3 CR (carriage return).</p>

+ 5 - 0
test/karlcow/2-paragraphs-line-returns.md

@@ -0,0 +1,5 @@
+A first paragraph.
+
+
+
+A second paragraph after 3 CR (carriage return).

+ 3 - 0
test/karlcow/2-paragraphs-line-spaces.html

@@ -0,0 +1,3 @@
+<p>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.</p>
+
+<p>A few spaces and a new long long long long long long long long long long long long long long long long paragraph on 1 line.</p>

+ 3 - 0
test/karlcow/2-paragraphs-line-spaces.md

@@ -0,0 +1,3 @@
+This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.
+     
+A few spaces and a new long long long long long long long long long long long long long long long long paragraph on 1 line.

+ 3 - 0
test/karlcow/2-paragraphs-line-tab.html

@@ -0,0 +1,3 @@
+<p>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.</p>
+
+<p>1 tab to separate them and a new long long long long long long long long long long long long long long long long paragraph on 1 line.</p>

+ 3 - 0
test/karlcow/2-paragraphs-line-tab.md

@@ -0,0 +1,3 @@
+This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.
+	
+1 tab to separate them and a new long long long long long long long long long long long long long long long long paragraph on 1 line.

+ 3 - 0
test/karlcow/2-paragraphs-line.html

@@ -0,0 +1,3 @@
+<p>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.</p>
+
+<p>A new long long long long long long long long long long long long long long long long paragraph on 1 line.</p>

+ 3 - 0
test/karlcow/2-paragraphs-line.md

@@ -0,0 +1,3 @@
+This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.
+
+A new long long long long long long long long long long long long long long long long paragraph on 1 line.

+ 5 - 0
test/karlcow/EOL-CR+LF.html

@@ -0,0 +1,5 @@
+<p>These lines all end with end of line (EOL) sequences.</p>
+
+<p>Seriously, they really do.</p>
+
+<p>If you don't believe me: HEX EDIT!</p>

+ 6 - 0
test/karlcow/EOL-CR+LF.md

@@ -0,0 +1,6 @@
+These lines all end with end of line (EOL) sequences.
+
+Seriously, they really do.
+
+If you don't believe me: HEX EDIT!
+

+ 1 - 0
test/karlcow/EOL-CR.html

@@ -0,0 +1 @@
+<p>These lines all end with end of line (EOL) sequences.</p>

<p>Seriously, they really do.</p>

<p>If you don't believe me: HEX EDIT!</p>

+ 1 - 0
test/karlcow/EOL-CR.md

@@ -0,0 +1 @@
+These lines all end with end of line (EOL) sequences.

Seriously, they really do.

If you don't believe me: HEX EDIT!


+ 5 - 0
test/karlcow/EOL-LF.html

@@ -0,0 +1,5 @@
+<p>These lines all end with end of line (EOL) sequences.</p>
+
+<p>Seriously, they really do.</p>
+
+<p>If you don't believe me: HEX EDIT!</p>

+ 6 - 0
test/karlcow/EOL-LF.md

@@ -0,0 +1,6 @@
+These lines all end with end of line (EOL) sequences.
+
+Seriously, they really do.
+
+If you don't believe me: HEX EDIT!
+

+ 1 - 0
test/karlcow/ampersand-text-flow.html

@@ -0,0 +1 @@
+<p>An ampersand &amp; in the text flow is escaped as an html entity.</p>

+ 1 - 0
test/karlcow/ampersand-text-flow.md

@@ -0,0 +1 @@
+An ampersand & in the text flow is escaped as an html entity.

+ 1 - 0
test/karlcow/ampersand-uri.html

@@ -0,0 +1 @@
+<p>There is an <a href="http://validator.w3.org/check?uri=http://www.w3.org/&amp;verbose=1">ampersand</a> in the URI.</p>

+ 1 - 0
test/karlcow/ampersand-uri.md

@@ -0,0 +1 @@
+There is an [ampersand](http://validator.w3.org/check?uri=http://www.w3.org/&verbose=1) in the URI.

+ 1 - 0
test/karlcow/asterisk-near-text.html

@@ -0,0 +1 @@
+<p>This is *an asterisk which should stay as is.</p>

+ 1 - 0
test/karlcow/asterisk-near-text.md

@@ -0,0 +1 @@
+This is \*an asterisk which should stay as is.

+ 1 - 0
test/karlcow/asterisk.html

@@ -0,0 +1 @@
+<p>This is * an asterisk which should stay as is.</p>

+ 1 - 0
test/karlcow/asterisk.md

@@ -0,0 +1 @@
+This is * an asterisk which should stay as is.

+ 12 - 0
test/karlcow/backslash-escape.html

@@ -0,0 +1,12 @@
+<p>\   backslash
+`   backtick
+*   asterisk
+_   underscore
+{}  curly braces
+[]  square brackets
+()  parentheses
+#   hash mark
++   plus sign
+-   minus sign (hyphen)
+.   dot
+!   exclamation mark</p>

+ 12 - 0
test/karlcow/backslash-escape.md

@@ -0,0 +1,12 @@
+\\   backslash
+\`   backtick
+\*   asterisk
+\_   underscore
+\{\}  curly braces
+\[\]  square brackets
+\(\)  parentheses
+\#   hash mark
+\+   plus sign
+\-   minus sign (hyphen)
+\.   dot
+\!   exclamation mark

+ 5 - 0
test/karlcow/blockquote-added-markup.html

@@ -0,0 +1,5 @@
+<blockquote>
+<h1>heading level 1</h1>
+
+<p>paragraph</p>
+</blockquote>

+ 3 - 0
test/karlcow/blockquote-added-markup.md

@@ -0,0 +1,3 @@
+> # heading level 1
+> 
+> paragraph

+ 5 - 0
test/karlcow/blockquote-line-2-paragraphs.html

@@ -0,0 +1,5 @@
+<blockquote>
+<p>A blockquote with a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.</p>
+
+<p>and a second very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.</p>
+</blockquote>

+ 3 - 0
test/karlcow/blockquote-line-2-paragraphs.md

@@ -0,0 +1,3 @@
+>A blockquote with a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.
+
+>and a second very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.

+ 3 - 0
test/karlcow/blockquote-line.html

@@ -0,0 +1,3 @@
+<blockquote>
+<p>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a blockquote.</p>
+</blockquote>

+ 1 - 0
test/karlcow/blockquote-line.md

@@ -0,0 +1 @@
+>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a blockquote.

+ 5 - 0
test/karlcow/blockquote-multiline-1-space-begin.html

@@ -0,0 +1,5 @@
+<blockquote>
+<p>A blockquote
+on multiple lines
+like this.</p>
+</blockquote>

+ 3 - 0
test/karlcow/blockquote-multiline-1-space-begin.md

@@ -0,0 +1,3 @@
+> A blockquote
+> on multiple lines
+> like this.

+ 5 - 0
test/karlcow/blockquote-multiline-1-space-end.html

@@ -0,0 +1,5 @@
+<blockquote>
+<p>A blockquote 
+on multiple lines 
+like this. </p>
+</blockquote>

+ 3 - 0
test/karlcow/blockquote-multiline-1-space-end.md

@@ -0,0 +1,3 @@
+>A blockquote 
+>on multiple lines 
+>like this. 

+ 8 - 0
test/karlcow/blockquote-multiline-2-paragraphs.html

@@ -0,0 +1,8 @@
+<blockquote>
+<p>A blockquote
+on multiple lines
+like this.</p>
+
+<p>But it has
+two paragraphs.</p>
+</blockquote>

+ 6 - 0
test/karlcow/blockquote-multiline-2-paragraphs.md

@@ -0,0 +1,6 @@
+>A blockquote
+>on multiple lines
+>like this.
+>
+>But it has
+>two paragraphs.

+ 5 - 0
test/karlcow/blockquote-multiline.html

@@ -0,0 +1,5 @@
+<blockquote>
+<p>A blockquote
+on multiple lines
+like this</p>
+</blockquote>

+ 3 - 0
test/karlcow/blockquote-multiline.md

@@ -0,0 +1,3 @@
+>A blockquote
+>on multiple lines
+>like this

+ 9 - 0
test/karlcow/blockquote-nested-multiplereturn-level1.html

@@ -0,0 +1,9 @@
+<blockquote>
+<p>This is the first level of quoting.</p>
+
+<blockquote>
+<p>This is nested blockquote.</p>
+</blockquote>
+
+<p>Back to the first level.</p>
+</blockquote>

+ 5 - 0
test/karlcow/blockquote-nested-multiplereturn-level1.md

@@ -0,0 +1,5 @@
+> This is the first level of quoting.
+>
+> > This is nested blockquote.
+>
+> Back to the first level.

+ 7 - 0
test/karlcow/blockquote-nested-multiplereturn.html

@@ -0,0 +1,7 @@
+<blockquote>
+<p>This is the first level of quoting.</p>
+
+<blockquote>
+<p>This is nested blockquote.</p>
+</blockquote>
+</blockquote>

+ 3 - 0
test/karlcow/blockquote-nested-multiplereturn.md

@@ -0,0 +1,3 @@
+> This is the first level of quoting.
+>
+> > This is nested blockquote.

+ 8 - 0
test/karlcow/blockquote-nested-return-level1.html

@@ -0,0 +1,8 @@
+<blockquote>
+<p>This is the first level of quoting.</p>
+
+<blockquote>
+<p>This is nested blockquote.
+Back to the first level.</p>
+</blockquote>
+</blockquote>

+ 3 - 0
test/karlcow/blockquote-nested-return-level1.md

@@ -0,0 +1,3 @@
+> This is the first level of quoting.
+> > This is nested blockquote.
+> Back to the first level.

+ 7 - 0
test/karlcow/blockquote-nested.html

@@ -0,0 +1,7 @@
+<blockquote>
+<p>This is the first level of quoting.</p>
+
+<blockquote>
+<p>This is nested blockquote.</p>
+</blockquote>
+</blockquote>

+ 2 - 0
test/karlcow/blockquote-nested.md

@@ -0,0 +1,2 @@
+> This is the first level of quoting.
+> > This is nested blockquote.

+ 3 - 0
test/karlcow/code-1-tab.html

@@ -0,0 +1,3 @@
+<pre><code>10 PRINT HELLO INFINITE
+20 GOTO 10
+</code></pre>

+ 2 - 0
test/karlcow/code-1-tab.md

@@ -0,0 +1,2 @@
+	10 PRINT HELLO INFINITE
+	20 GOTO 10

+ 3 - 0
test/karlcow/code-4-spaces-escaping.html

@@ -0,0 +1,3 @@
+<pre><code>10 PRINT &lt; &gt; &amp;
+20 GOTO 10
+</code></pre>

+ 2 - 0
test/karlcow/code-4-spaces-escaping.md

@@ -0,0 +1,2 @@
+    10 PRINT < > &
+    20 GOTO 10

+ 3 - 0
test/karlcow/code-4-spaces.html

@@ -0,0 +1,3 @@
+<pre><code>10 PRINT HELLO INFINITE
+20 GOTO 10
+</code></pre>

+ 2 - 0
test/karlcow/code-4-spaces.md

@@ -0,0 +1,2 @@
+    10 PRINT HELLO INFINITE
+    20 GOTO 10

+ 1 - 0
test/karlcow/em-middle-word.html

@@ -0,0 +1 @@
+<p>as<em>te</em>risks</p>

+ 1 - 0
test/karlcow/em-middle-word.md

@@ -0,0 +1 @@
+as*te*risks

+ 1 - 0
test/karlcow/em-star.html

@@ -0,0 +1 @@
+<p><em>single asterisks</em></p>

+ 1 - 0
test/karlcow/em-star.md

@@ -0,0 +1 @@
+*single asterisks*

+ 1 - 0
test/karlcow/em-underscore.html

@@ -0,0 +1 @@
+<p><em>single underscores</em></p>

+ 1 - 0
test/karlcow/em-underscore.md

@@ -0,0 +1 @@
+_single underscores_

+ 1 - 0
test/karlcow/entities-text-flow.html

@@ -0,0 +1 @@
+<p>HTML entities are written using ampersand notation: &copy;</p>

+ 1 - 0
test/karlcow/entities-text-flow.md

@@ -0,0 +1 @@
+HTML entities are written using ampersand notation: &copy;

+ 1 - 0
test/karlcow/header-level1-equal-underlined.html

@@ -0,0 +1 @@
+<h1>This is an H1</h1>

+ 2 - 0
test/karlcow/header-level1-equal-underlined.md

@@ -0,0 +1,2 @@
+This is an H1
+=============

+ 1 - 0
test/karlcow/header-level1-hash-sign-closed.html

@@ -0,0 +1 @@
+<h1>This is an H1</h1>

+ 1 - 0
test/karlcow/header-level1-hash-sign-closed.md

@@ -0,0 +1 @@
+# This is an H1 #

+ 1 - 0
test/karlcow/header-level1-hash-sign-trailing-1-space.html

@@ -0,0 +1 @@
+<p># This is an H1</p>

+ 1 - 0
test/karlcow/header-level1-hash-sign-trailing-1-space.md

@@ -0,0 +1 @@
+ # This is an H1

+ 3 - 0
test/karlcow/header-level1-hash-sign-trailing-2-spaces.html

@@ -0,0 +1,3 @@
+<h1>this is an h1 with two trailing spaces</h1>
+
+<p>A new paragraph.</p>

+ 2 - 0
test/karlcow/header-level1-hash-sign-trailing-2-spaces.md

@@ -0,0 +1,2 @@
+# this is an h1 with two trailing spaces  
+A new paragraph.

+ 1 - 0
test/karlcow/header-level1-hash-sign.html

@@ -0,0 +1 @@
+<h1>This is an H1</h1>

+ 1 - 0
test/karlcow/header-level1-hash-sign.md

@@ -0,0 +1 @@
+# This is an H1

+ 1 - 0
test/karlcow/header-level2-dash-underlined.html

@@ -0,0 +1 @@
+<h2>This is an H2</h2>

+ 2 - 0
test/karlcow/header-level2-dash-underlined.md

@@ -0,0 +1,2 @@
+This is an H2
+-------------

+ 1 - 0
test/karlcow/header-level2-hash-sign-closed.html

@@ -0,0 +1 @@
+<h2>This is an H2</h2>

+ 1 - 0
test/karlcow/header-level2-hash-sign-closed.md

@@ -0,0 +1 @@
+## This is an H2 ##

+ 1 - 0
test/karlcow/header-level2-hash-sign.html

@@ -0,0 +1 @@
+<h2>This is an H2</h2>

+ 1 - 0
test/karlcow/header-level2-hash-sign.md

@@ -0,0 +1 @@
+## This is an H2

+ 1 - 0
test/karlcow/header-level3-hash-sign-closed.html

@@ -0,0 +1 @@
+<h3>This is an H3</h3>

+ 1 - 0
test/karlcow/header-level3-hash-sign-closed.md

@@ -0,0 +1 @@
+### This is an H3 ###

+ 1 - 0
test/karlcow/header-level3-hash-sign.html

@@ -0,0 +1 @@
+<h3>This is an H3</h3>

+ 1 - 0
test/karlcow/header-level3-hash-sign.md

@@ -0,0 +1 @@
+### This is an H3

+ 1 - 0
test/karlcow/header-level4-hash-sign-closed.html

@@ -0,0 +1 @@
+<h4>This is an H4</h4>

+ 1 - 0
test/karlcow/header-level4-hash-sign-closed.md

@@ -0,0 +1 @@
+#### This is an H4 ####

+ 1 - 0
test/karlcow/header-level4-hash-sign.html

@@ -0,0 +1 @@
+<h4>This is an H4</h4>

+ 1 - 0
test/karlcow/header-level4-hash-sign.md

@@ -0,0 +1 @@
+#### This is an H4

+ 1 - 0
test/karlcow/header-level5-hash-sign-closed.html

@@ -0,0 +1 @@
+<h5>This is an H5</h5>

+ 1 - 0
test/karlcow/header-level5-hash-sign-closed.md

@@ -0,0 +1 @@
+##### This is an H5 #####

+ 1 - 0
test/karlcow/header-level5-hash-sign.html

@@ -0,0 +1 @@
+<h5>This is an H5</h5>

+ 1 - 0
test/karlcow/header-level5-hash-sign.md

@@ -0,0 +1 @@
+##### This is an H5

Vissa filer visades inte eftersom för många filer har ändrats