ref: 01ee525f47289fa95fd3897815c72b60c58b47f1
parent: 1b46d2cfeed781d5197ce56134c4a9107b45fcc9
author: magikstm <[email protected]>
date: Wed Jan 4 12:19:09 EST 2017
hugolib: Correct usage of "shortcode" in error messages
--- a/hugolib/hugo_sites.go
+++ b/hugolib/hugo_sites.go
@@ -446,7 +446,7 @@
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())
}
}
--- a/hugolib/shortcode.go
+++ b/hugolib/shortcode.go
@@ -167,7 +167,7 @@
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
}
--- a/hugolib/shortcode_test.go
+++ b/hugolib/shortcode_test.go
@@ -441,7 +441,7 @@
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)
}
}
}