From 01ee525f47289fa95fd3897815c72b60c58b47f1 Mon Sep 17 00:00:00 2001 From: magikstm Date: Wed, 4 Jan 2017 17:19:09 -0500 Subject: [PATCH] hugolib: Correct usage of "shortcode" in error messages --- hugolib/hugo_sites.go | 2 +- hugolib/shortcode.go | 2 +- hugolib/shortcode_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index 611be6808..3c5295540 100644 --- a/hugolib/hugo_sites.go +++ b/hugolib/hugo_sites.go @@ -446,7 +446,7 @@ func handleShortcodes(p *Page, t tpl.Template, rawContentCopy []byte) ([]byte, e rawContentCopy, err = replaceShortcodeTokens(rawContentCopy, shortcodePlaceholderPrefix, shortcodes) if err != nil { - jww.FATAL.Printf("Failed to replace short code tokens in %s:\n%s", p.BaseFileName(), err.Error()) + jww.FATAL.Printf("Failed to replace shortcode tokens in %s:\n%s", p.BaseFileName(), err.Error()) } } diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go index 0b583b753..a08b76339 100644 --- a/hugolib/shortcode.go +++ b/hugolib/shortcode.go @@ -167,7 +167,7 @@ func HandleShortcodes(stringToParse string, page *Page, t tpl.Template) (string, tmpContentWithTokensReplaced, err := replaceShortcodeTokens([]byte(tmpContent), shortcodePlaceholderPrefix, shortcodes) if err != nil { - return "", fmt.Errorf("Fail to replace short code tokens in %s:\n%s", page.BaseFileName(), err.Error()) + return "", fmt.Errorf("Failed to replace shortcode tokens in %s:\n%s", page.BaseFileName(), err.Error()) } return string(tmpContentWithTokensReplaced), nil } diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go index 536c06541..e7fbe7567 100644 --- a/hugolib/shortcode_test.go +++ b/hugolib/shortcode_test.go @@ -441,7 +441,7 @@ func TestExtractShortcodes(t *testing.T) { if this.expectShortCodes != "" { shortCodesAsStr := fmt.Sprintf("map%q", collectAndSortShortcodes(shortCodes)) if !strings.Contains(shortCodesAsStr, this.expectShortCodes) { - t.Fatalf("[%d] %s: Short codes not as expected, got %s but expected %s", i, this.name, shortCodesAsStr, this.expectShortCodes) + t.Fatalf("[%d] %s: Shortcodes not as expected, got %s but expected %s", i, this.name, shortCodesAsStr, this.expectShortCodes) } } }