Fix it so e.g. de in layouts/_shortcodes/de.html is not interpreted as a language code

Fixes #13740
This commit is contained in:
Bjørn Erik Pedersen
2025-05-26 10:22:13 +02:00
parent f47193669d
commit 9ad26b69ad
3 changed files with 18 additions and 8 deletions

View File

@@ -730,16 +730,16 @@ SHORTCODE
b.Assert(err.Error(), qt.Contains, `no compatible template found for shortcode "mymarkdown" in [/_shortcodes/mymarkdown.md]; note that to use plain text template shortcodes in HTML you need to use the shortcode {{% delimiter`)
}
func TestShortcodeOnlyLanguageInBaseIssue13699(t *testing.T) {
func TestShortcodeOnlyLanguageInBaseIssue13699And13740(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
baseURL = 'https://example.org/'
disableLanguages = ['de']
[languages]
[languages.en]
weight = 1
disableLanguages = ['de']
[languages.de]
weight = 2
-- layouts/_shortcodes/de.html --