diff --git a/markdown/markdown_test.go b/markdown/markdown_test.go
index 2478084..51ab081 100644
--- a/markdown/markdown_test.go
+++ b/markdown/markdown_test.go
@@ -66,7 +66,7 @@ func TestCompileMarkdownDropH1(t *testing.T) {
test := assert.New(t)
- testcases, err := filepath.Glob("testdata/*.md")
+ testcases, err := filepath.Glob("testdata/*.md")
if err != nil {
panic(err)
}
@@ -76,7 +76,14 @@ func TestCompileMarkdownDropH1(t *testing.T) {
if err != nil {
panic(err)
}
- markdown, htmlname, html := loadData(t, filename, "-droph1")
+ var variant string
+ switch filename {
+ case "testdata/quotes.md", "testdata/header.md":
+ variant = "-droph1"
+ default:
+ variant = ""
+ }
+ markdown, htmlname, html := loadData(t, filename, variant)
actual, _ := CompileMarkdown(markdown, lib, filename, "", 1.0, true, false)
test.EqualValues(string(html), actual, filename+" vs "+htmlname)
}
@@ -92,7 +99,7 @@ func TestCompileMarkdownStripNewlines(t *testing.T) {
test := assert.New(t)
- testcases, err := filepath.Glob("testdata/*.md")
+ testcases, err := filepath.Glob("testdata/*.md")
if err != nil {
panic(err)
}
@@ -102,7 +109,15 @@ func TestCompileMarkdownStripNewlines(t *testing.T) {
if err != nil {
panic(err)
}
- markdown, htmlname, html := loadData(t, filename, "-stripnewlines")
+ var variant string
+ switch filename {
+ case "testdata/quotes.md", "testdata/codes.md", "testdata/newlines.md", "testdata/macro-include.md":
+ variant = "-stripnewlines"
+ default:
+ variant = ""
+ }
+
+ markdown, htmlname, html := loadData(t, filename, variant)
actual, _ := CompileMarkdown(markdown, lib, filename, "", 1.0, false, true)
test.EqualValues(string(html), actual, filename+" vs "+htmlname)
}
diff --git a/testdata/codes-droph1.html b/testdata/codes-droph1.html
deleted file mode 100644
index 733410b..0000000
--- a/testdata/codes-droph1.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
inline
-falsebashfalsebashfalseunknownfalsetext
-text 2
-unknownfalseshfalseA b cbashtrueA b cctruenestedfalsefalsetruefalseB;
- A-->C;
- B-->D;
- C-->D;]]>truetruemy mermaid graphB;
- A-->C;
- B-->D;
- C-->D;]]>truefalsemy mermaid graphB;
- A-->C;
- B-->D;
- C-->D;]]>
\ No newline at end of file
diff --git a/testdata/header-stripnewlines.html b/testdata/header-stripnewlines.html
deleted file mode 100644
index 566c4ae..0000000
--- a/testdata/header-stripnewlines.html
+++ /dev/null
@@ -1,7 +0,0 @@
-a
-b
-c
-d
-e
-f
-g
diff --git a/testdata/issue-64-broken-link-droph1.html b/testdata/issue-64-broken-link-droph1.html
deleted file mode 100644
index 0d39ce8..0000000
--- a/testdata/issue-64-broken-link-droph1.html
+++ /dev/null
@@ -1 +0,0 @@
-v71
diff --git a/testdata/issue-64-broken-link-stripnewlines.html b/testdata/issue-64-broken-link-stripnewlines.html
deleted file mode 100644
index 0d39ce8..0000000
--- a/testdata/issue-64-broken-link-stripnewlines.html
+++ /dev/null
@@ -1 +0,0 @@
-v71
diff --git a/testdata/links-droph1.html b/testdata/links-droph1.html
deleted file mode 100644
index d9ca603..0000000
--- a/testdata/links-droph1.html
+++ /dev/null
@@ -1,21 +0,0 @@
-Use https://example.com
-Use aaa
-Use
-Use
-Use
-Use
-Use
-
-
-
-
-Use footnotes link
-Use Link [Text]
-
diff --git a/testdata/links-stripnewlines.html b/testdata/links-stripnewlines.html
deleted file mode 100644
index d9ca603..0000000
--- a/testdata/links-stripnewlines.html
+++ /dev/null
@@ -1,21 +0,0 @@
-Use https://example.com
-Use aaa
-Use
-Use
-Use
-Use
-Use
-
-
-
-
-Use footnotes link
-Use Link [Text]
-
diff --git a/testdata/lists-droph1.html b/testdata/lists-droph1.html
deleted file mode 100644
index af27c54..0000000
--- a/testdata/lists-droph1.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-- dash 1-1
-- dash 1-2
-- dash 1-3
-
-- dash 1-3-1
-- dash 1-3-2
-- dash 1-3-3
-
-
-
-
-
-text
-
diff --git a/testdata/lists-stripnewlines.html b/testdata/lists-stripnewlines.html
deleted file mode 100644
index af27c54..0000000
--- a/testdata/lists-stripnewlines.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-- dash 1-1
-- dash 1-2
-- dash 1-3
-
-- dash 1-3-1
-- dash 1-3-2
-- dash 1-3-3
-
-
-
-
-
-text
-
diff --git a/testdata/macro-include-droph1.html b/testdata/macro-include-droph1.html
deleted file mode 100644
index ccf5127..0000000
--- a/testdata/macro-include-droph1.html
+++ /dev/null
@@ -1,26 +0,0 @@
-bar
-
-true
-Attention
-This is an info!
-
-
-true
-Attention
-
-
-
-
-Header 1 |
-Header 2 |
-
-
-
-
-Cell A |
-Cell B |
-
-
-
-
-
diff --git a/testdata/newlines-droph1.html b/testdata/newlines-droph1.html
deleted file mode 100644
index b97e510..0000000
--- a/testdata/newlines-droph1.html
+++ /dev/null
@@ -1,10 +0,0 @@
-one-1
-one-2
-two-1
-two-2
-three-1
-three-2
-space-1
-space-2
-2space-1
-2space-2
diff --git a/testdata/pagelayout-droph1.html b/testdata/pagelayout-droph1.html
deleted file mode 100644
index a244202..0000000
--- a/testdata/pagelayout-droph1.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-More Content
-
-
-More Content
-
-
-Even More Content
-
-
-
-
-Still More Content
-
-
-
diff --git a/testdata/pagelayout-stripnewlines.html b/testdata/pagelayout-stripnewlines.html
deleted file mode 100644
index a244202..0000000
--- a/testdata/pagelayout-stripnewlines.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-More Content
-
-
-More Content
-
-
-Even More Content
-
-
-
-
-Still More Content
-
-
-
diff --git a/testdata/table-droph1.html b/testdata/table-droph1.html
deleted file mode 100644
index 615d12e..0000000
--- a/testdata/table-droph1.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-HEADER1 |
-HEADER2 |
-
-
-
-
-row1 |
-row2 |
-
-
-
-
-
-
-HEADER1 |
-HEADER2 |
-
-
-
-
-row1 |
-row2 |
-
-
-
diff --git a/testdata/table-stripnewlines.html b/testdata/table-stripnewlines.html
deleted file mode 100644
index 615d12e..0000000
--- a/testdata/table-stripnewlines.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-HEADER1 |
-HEADER2 |
-
-
-
-
-row1 |
-row2 |
-
-
-
-
-
-
-HEADER1 |
-HEADER2 |
-
-
-
-
-row1 |
-row2 |
-
-
-
diff --git a/testdata/tags-droph1.html b/testdata/tags-droph1.html
deleted file mode 100644
index 7fd51c0..0000000
--- a/testdata/tags-droph1.html
+++ /dev/null
@@ -1,6 +0,0 @@
-bold
-bold
-vitalik
-vitalik
-strikethrough
-strikethrough
diff --git a/testdata/tags-stripnewlines.html b/testdata/tags-stripnewlines.html
deleted file mode 100644
index 7fd51c0..0000000
--- a/testdata/tags-stripnewlines.html
+++ /dev/null
@@ -1,6 +0,0 @@
-bold
-bold
-vitalik
-vitalik
-strikethrough
-strikethrough