From 1346a11cb40b96b8f3db6bea8a8addaea28b2389 Mon Sep 17 00:00:00 2001
From: nicovalencia This is an example reference-style link.
This is another reference-style link.
This is a third reference-style link.
-This is a fourth reference-style link.' + _RunSpanGamut(m1) + "
");});
+ text = text.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm, function(wholeMatch,m1){
+ return hashBlock('' + _RunSpanGamut(m1) + "
");
+ });
- text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,
- function(matchFound,m1){return hashBlock('' + _RunSpanGamut(m1) + "
");});
+ text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm, function(matchFound,m1){
+ return hashBlock('' + _RunSpanGamut(m1) + "
");
+ });
// atx-style headers:
// # Header 1
@@ -799,15 +821,11 @@ Showdown.converter = function(converter_options) {
/gm, function() {...});
*/
- text = text.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,
- function(wholeMatch,m1,m2) {
- var h_level = m1.length;
- return hashBlock("
-This is a header.
+This is a header.
- This is the first list item.
diff --git a/test/cases/h1-with-double-hash.html b/test/cases/h1-with-double-hash.html index 2cecc38..749011b 100644 --- a/test/cases/h1-with-double-hash.html +++ b/test/cases/h1-with-double-hash.html @@ -1 +1 @@ -This is an H1
\ No newline at end of file +This is an H1
diff --git a/test/cases/h1-with-equals.html b/test/cases/h1-with-equals.html index 2cecc38..749011b 100644 --- a/test/cases/h1-with-equals.html +++ b/test/cases/h1-with-equals.html @@ -1 +1 @@ -This is an H1
\ No newline at end of file +This is an H1
diff --git a/test/cases/h1-with-single-hash.html b/test/cases/h1-with-single-hash.html index 2cecc38..749011b 100644 --- a/test/cases/h1-with-single-hash.html +++ b/test/cases/h1-with-single-hash.html @@ -1 +1 @@ -This is an H1
\ No newline at end of file +This is an H1
diff --git a/test/cases/h2-with-dashes.html b/test/cases/h2-with-dashes.html index d040d75..2fc6b0b 100644 --- a/test/cases/h2-with-dashes.html +++ b/test/cases/h2-with-dashes.html @@ -1 +1 @@ -This is an H2
\ No newline at end of file +This is an H2
diff --git a/test/cases/h2-with-double-hash.html b/test/cases/h2-with-double-hash.html index d040d75..2fc6b0b 100644 --- a/test/cases/h2-with-double-hash.html +++ b/test/cases/h2-with-double-hash.html @@ -1 +1 @@ -This is an H2
\ No newline at end of file +This is an H2
diff --git a/test/cases/h2-with-single-hash.html b/test/cases/h2-with-single-hash.html index d040d75..2fc6b0b 100644 --- a/test/cases/h2-with-single-hash.html +++ b/test/cases/h2-with-single-hash.html @@ -1 +1 @@ -This is an H2
\ No newline at end of file +This is an H2
diff --git a/test/cases/h3-with-double-hash.html b/test/cases/h3-with-double-hash.html index 082318e..92a7399 100644 --- a/test/cases/h3-with-double-hash.html +++ b/test/cases/h3-with-double-hash.html @@ -1 +1 @@ -This is an H3
\ No newline at end of file +This is an H3
diff --git a/test/cases/h3-with-single-hash.html b/test/cases/h3-with-single-hash.html index 082318e..92a7399 100644 --- a/test/cases/h3-with-single-hash.html +++ b/test/cases/h3-with-single-hash.html @@ -1 +1 @@ -This is an H3
\ No newline at end of file +This is an H3
diff --git a/test/cases/h4-with-single-hash.html b/test/cases/h4-with-single-hash.html index cc32aa1..605e93a 100644 --- a/test/cases/h4-with-single-hash.html +++ b/test/cases/h4-with-single-hash.html @@ -1 +1 @@ -This is an H4
\ No newline at end of file +This is an H4
diff --git a/test/cases/h5-with-single-hash.html b/test/cases/h5-with-single-hash.html index 96dca78..ae3a75d 100644 --- a/test/cases/h5-with-single-hash.html +++ b/test/cases/h5-with-single-hash.html @@ -1 +1 @@ -This is an H5
\ No newline at end of file +This is an H5
diff --git a/test/cases/h6-with-single-hash.html b/test/cases/h6-with-single-hash.html index 10de690..a93ba51 100644 --- a/test/cases/h6-with-single-hash.html +++ b/test/cases/h6-with-single-hash.html @@ -1 +1 @@ -This is an H6
\ No newline at end of file +This is an H6