commit 01ee525f47289fa95fd3897815c72b60c58b47f1
parent 1b46d2cfeed781d5197ce56134c4a9107b45fcc9
Author: magikstm <myskina@gmail.com>
Date: Wed, 4 Jan 2017 17:19:09 -0500
hugolib: Correct usage of "shortcode" in error messages
Diffstat:
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git 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
@@ -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
@@ -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)
}
}
}