2011-06-02 08:52:24 +08:00
|
|
|
//
|
2011-06-28 10:11:32 +08:00
|
|
|
// Blackfriday Markdown Processor
|
|
|
|
// Available at http://github.com/russross/blackfriday
|
|
|
|
//
|
|
|
|
// Copyright © 2011 Russ Ross <russ@russross.com>.
|
2011-06-29 01:30:10 +08:00
|
|
|
// Distributed under the Simplified BSD License.
|
2011-06-28 10:11:32 +08:00
|
|
|
// See README.md for details.
|
2011-06-02 08:52:24 +08:00
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
// Markdown 1.0.3 reference tests
|
|
|
|
//
|
|
|
|
|
|
|
|
package blackfriday
|
|
|
|
|
2016-04-04 15:41:05 +08:00
|
|
|
import "testing"
|
2011-06-02 08:52:24 +08:00
|
|
|
|
|
|
|
func TestReference(t *testing.T) {
|
|
|
|
files := []string{
|
|
|
|
"Amps and angle encoding",
|
|
|
|
"Auto links",
|
|
|
|
"Backslash escapes",
|
|
|
|
"Blockquotes with code blocks",
|
|
|
|
"Code Blocks",
|
|
|
|
"Code Spans",
|
|
|
|
"Hard-wrapped paragraphs with list-like lines",
|
|
|
|
"Horizontal rules",
|
|
|
|
"Inline HTML (Advanced)",
|
|
|
|
"Inline HTML (Simple)",
|
|
|
|
"Inline HTML comments",
|
|
|
|
"Links, inline style",
|
|
|
|
"Links, reference style",
|
|
|
|
"Links, shortcut references",
|
|
|
|
"Literal quotes in titles",
|
|
|
|
"Markdown Documentation - Basics",
|
|
|
|
"Markdown Documentation - Syntax",
|
|
|
|
"Nested blockquotes",
|
|
|
|
"Ordered and unordered lists",
|
|
|
|
"Strong and em together",
|
|
|
|
"Tabs",
|
|
|
|
"Tidyness",
|
|
|
|
}
|
2013-07-30 10:32:11 +08:00
|
|
|
doTestsReference(t, files, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestReference_EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK(t *testing.T) {
|
|
|
|
files := []string{
|
|
|
|
"Amps and angle encoding",
|
|
|
|
"Auto links",
|
|
|
|
"Backslash escapes",
|
|
|
|
"Blockquotes with code blocks",
|
|
|
|
"Code Blocks",
|
|
|
|
"Code Spans",
|
|
|
|
"Hard-wrapped paragraphs with list-like lines no empty line before block",
|
|
|
|
"Horizontal rules",
|
|
|
|
"Inline HTML (Advanced)",
|
|
|
|
"Inline HTML (Simple)",
|
|
|
|
"Inline HTML comments",
|
|
|
|
"Links, inline style",
|
|
|
|
"Links, reference style",
|
|
|
|
"Links, shortcut references",
|
|
|
|
"Literal quotes in titles",
|
|
|
|
"Markdown Documentation - Basics",
|
|
|
|
"Markdown Documentation - Syntax",
|
|
|
|
"Nested blockquotes",
|
|
|
|
"Ordered and unordered lists",
|
|
|
|
"Strong and em together",
|
|
|
|
"Tabs",
|
|
|
|
"Tidyness",
|
|
|
|
}
|
2015-10-27 00:16:57 +08:00
|
|
|
doTestsReference(t, files, NoEmptyLineBeforeBlock)
|
2011-06-02 08:52:24 +08:00
|
|
|
}
|