diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-04-12 18:11:24 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-04-12 18:11:24 +0200 |
commit | 39c9ae3108fa1a36f0e2581e6235058ebdea6137 (patch) | |
tree | bae1337066656ef0107edd7f35a9126efa1d6543 /helpers/content_test.go | |
parent | 2468b10eb35ee3e9871a25416ca0bf627caae851 (diff) |
Revert "Use Node.ID for anchor ID"
This reverts commit cd558958a0c0ecd06f7560a38e27334fe983e0de.
Diffstat (limited to 'helpers/content_test.go')
-rw-r--r-- | helpers/content_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/helpers/content_test.go b/helpers/content_test.go index 347884f0a..a89b4992e 100644 --- a/helpers/content_test.go +++ b/helpers/content_test.go @@ -172,15 +172,15 @@ func TestGetHTMLRendererAllFlags(t *testing.T) { func TestGetHTMLRendererAnchors(t *testing.T) { ctx := &RenderingContext{} - ctx.DocumentID = 123 + ctx.DocumentID = "testid" ctx.Config = ctx.getConfig() ctx.Config.PlainIDAnchors = false actualRenderer := getHTMLRenderer(0, ctx) headerBuffer := &bytes.Buffer{} footnoteBuffer := &bytes.Buffer{} - expectedFootnoteHref := []byte("href=\"#fn:123:href\"") - expectedHeaderID := []byte("<h1 id=\"id:123\"></h1>\n") + expectedFootnoteHref := []byte("href=\"#fn:testid:href\"") + expectedHeaderID := []byte("<h1 id=\"id:testid\"></h1>\n") actualRenderer.Header(headerBuffer, func() bool { return true }, 1, "id") actualRenderer.FootnoteRef(footnoteBuffer, []byte("href"), 1) @@ -196,14 +196,14 @@ func TestGetHTMLRendererAnchors(t *testing.T) { func TestGetMmarkHTMLRenderer(t *testing.T) { ctx := &RenderingContext{} - ctx.DocumentID = 321 + ctx.DocumentID = "testid" ctx.Config = ctx.getConfig() ctx.Config.PlainIDAnchors = false actualRenderer := getMmarkHTMLRenderer(0, ctx) headerBuffer := &bytes.Buffer{} footnoteBuffer := &bytes.Buffer{} - expectedFootnoteHref := []byte("href=\"#fn:321:href\"") + expectedFootnoteHref := []byte("href=\"#fn:testid:href\"") expectedHeaderID := []byte("<h1 id=\"id\"></h1>") actualRenderer.FootnoteRef(footnoteBuffer, []byte("href"), 1) |