Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added test for "# H1 #" style headers. Renamed to ATX in test name.

  • Loading branch information...
commit 33d4ef82c9618cd860afa8c5fadca9fa28a2b16a 1 parent ecc9b81
@jasononeil authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 test/ExampleTest.hx
View
15 test/ExampleTest.hx
@@ -163,7 +163,7 @@ This is another regular paragraph.";
}
@Test
- public function testSharpHeaders():Void
+ public function testATXHeaders():Void
{
var str = "# H1"
+ '\n' + "## H2"
@@ -176,6 +176,19 @@ This is another regular paragraph.";
}
@Test
+ public function testATXHeadersClosed():Void
+ {
+ var str = "# H1 #"
+ + '\n' + "## H2 ##"
+ + '\n' + "### H3 #######################"
+ + '\n' + "#### H4 ####"
+ + '\n' + "##### H5 #####"
+ + '\n' + "###### H6 ######";
+ var result = Markdown.convert(str);
+ Assert.areEqual("<h1>H1</h1>\n\n<h2>H2</h2>\n\n<h3>H3</h3>\n\n<h4>H4</h4>\n\n<h5>H5</h5>\n\n<h6>H6</h6>", result);
+ }
+
+ @Test
public function testBold():Void
{
var str = "I have some **bold** text.";
Please sign in to comment.
Something went wrong with that request. Please try again.