Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2014-10-29 08:08:31 +0300
committerspf13 <steve.francia@gmail.com>2014-11-25 02:01:57 +0300
commit8f9cea7f58e8acbffd2a14bc41225f4609963584 (patch)
tree89842296a5c842a497f30a1f93297725ad2d2100 /hugolib/shortcode_test.go
parent0282c922b4d788dcb9a281f036fe24280edd0054 (diff)
Enable descriptive header IDs.
Enable blackfriday.EXTENSION_AUTO_HEADER_IDS to generate the name of the header ID from the text in the header. Works for prefix and underline headers. - TOC extraction had to be modified to look for `<li><a href="#`> instead of `#toc_` because of this change. - Fixed a number of tests that depended on the presence of `toc_` with as an `id` or as a `href` value. - Renames the earlier parameter `footnoteref` to `documentId` as it more accurately represents the nature of the parameter. The `documentId` is appended to all generated headers through the new HTML renderer parameter `HeaderIDSuffix`.
Diffstat (limited to 'hugolib/shortcode_test.go')
-rw-r--r--hugolib/shortcode_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go
index 002946bfd..9c5bc1c58 100644
--- a/hugolib/shortcode_test.go
+++ b/hugolib/shortcode_test.go
@@ -74,7 +74,7 @@ func TestInnerSCWithMarkdown(t *testing.T) {
[link](http://spf13.com) and text
-{{% /inside %}}`, "<div><h1>More Here</h1>\n\n<p><a href=\"http://spf13.com\">link</a> and text</p>\n</div>", tem)
+{{% /inside %}}`, "<div><h1 id=\"more-here:bec3ed8ba720b9073ab75abcf3ba5d97\">More Here</h1>\n\n<p><a href=\"http://spf13.com\">link</a> and text</p>\n</div>", tem)
}
func TestInnerSCWithAndWithoutMarkdown(t *testing.T) {
@@ -96,7 +96,7 @@ And then:
This is **plain** text.
{{< /inside >}}
-`, "<div><h1>More Here</h1>\n\n<p><a href=\"http://spf13.com\">link</a> and text</p>\n</div>\n\nAnd then:\n\n<div>\n# More Here\n\nThis is **plain** text.\n\n</div>\n", tem)
+`, "<div><h1 id=\"more-here:bec3ed8ba720b9073ab75abcf3ba5d97\">More Here</h1>\n\n<p><a href=\"http://spf13.com\">link</a> and text</p>\n</div>\n\nAnd then:\n\n<div>\n# More Here\n\nThis is **plain** text.\n\n</div>\n", tem)
}
func TestEmbeddedSC(t *testing.T) {