"slug": "spf13-vim-3-0-release-and-new-website"
}
+Content of the file goes Here
+`
+ SIMPLE_PAGE_JSON_LOOSE = `
+{
+"title": "spf13-vim 3.0 release and new website"
+"description": "spf13-vim is a cross platform distribution of vim plugins and resources for Vim."
+"tags": [ ".vimrc", "plugins", "spf13-vim", "vim" ]
+"date": "2012-04-06"
+"categories": [
+ "Development"
+ "VIM"
+],
+"slug": "spf13-vim-3-0-release-and-new-website"
+}
+
Content of the file goes Here
`
SIMPLE_PAGE_RFC3339_DATE = "---\ntitle: RFC3339 Date\ndate: \"2013-05-17T16:59:30Z\"\n---\nrfc3339 content"
r string
}{
{SIMPLE_PAGE_JSON},
+ {SIMPLE_PAGE_JSON_LOOSE},
{SIMPLE_PAGE_JSON_MULTIPLE},
//{strings.NewReader(SIMPLE_PAGE_JSON_COMPACT)},
}
CONTENT_SLUG_BUG = "---\ntitle: slug doc 2\nslug: slug-doc-2\n---\nslug doc 2 content"
CONTENT_FM_NO_DOC = "---\ntitle: no doc\n---"
CONTENT_WITH_JS_FM = "{\n \"categories\": \"d\",\n \"tags\": [\n \"a\", \n \"b\", \n \"c\"\n ]\n}\nJSON Front Matter with tags and categories"
+ CONTENT_WITH_JS_LOOSE_FM = "{\n \"categories\": \"d\"\n \"tags\": [\n \"a\" \n \"b\" \n \"c\"\n ]\n}\nJSON Front Matter with tags and categories"
)
var lineEndings = []string{"\n", "\r\n"}
{CONTENT_LWS_HTML, false, true, "", "<html><body></body></html>"},
{CONTENT_LWS_LF_HTML, false, true, "", "<html><body></body></html>"},
{CONTENT_WITH_JS_FM, true, false, "{\n \"categories\": \"d\",\n \"tags\": [\n \"a\", \n \"b\", \n \"c\"\n ]\n}", "JSON Front Matter with tags and categories"},
+ {CONTENT_WITH_JS_LOOSE_FM, true, false, "{\n \"categories\": \"d\"\n \"tags\": [\n \"a\" \n \"b\" \n \"c\"\n ]\n}", "JSON Front Matter with tags and categories"},
{CONTENT_SLUG_WORKING, true, false, "---\ntitle: slug doc 2\nslug: slug-doc-2\n\n---\n", "slug doc 2 content"},
{CONTENT_SLUG_WORKING_VARIATION, true, false, "---\ntitle: slug doc 3\nslug: slug-doc 3\n---\n", "slug doc 3 content"},
{CONTENT_SLUG_BUG, true, false, "---\ntitle: slug doc 2\nslug: slug-doc-2\n---\n", "slug doc 2 content"},
{"{ { } { } }", "{ { } { } }", noErrExpected},
{"{\n{\n}\n}\n", "{\n{\n}\n}", noErrExpected},
{"{\n \"categories\": \"d\",\n \"tags\": [\n \"a\", \n \"b\", \n \"c\"\n ]\n}\nJSON Front Matter with tags and categories", "{\n \"categories\": \"d\",\n \"tags\": [\n \"a\", \n \"b\", \n \"c\"\n ]\n}", noErrExpected},
+ {"{\n \"categories\": \"d\"\n \"tags\": [\n \"a\" \n \"b\" \n \"c\"\n ]\n}\nJSON Front Matter with tags and categories", "{\n \"categories\": \"d\"\n \"tags\": [\n \"a\" \n \"b\" \n \"c\"\n ]\n}", noErrExpected},
}
for _, test := range tests {