diff options
author | JB <[email protected]> | 2022-10-14 12:16:53 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-14 12:16:53 +0200 |
commit | 01ebb6e304b243c335470f737cf7ad8b9d70bac9 (patch) | |
tree | 843d0b4b0500d03a4d05b9917aa9b1e48fb92705 /transform | |
parent | a066e98851dfbd78c17c98f0878c2e8b84a10f50 (diff) | |
download | hugo-01ebb6e304b243c335470f737cf7ad8b9d70bac9.tar.gz hugo-01ebb6e304b243c335470f737cf7ad8b9d70bac9.zip |
Don't use self-closing generator tag
Diffstat (limited to 'transform')
-rw-r--r-- | transform/metainject/hugogenerator.go | 2 | ||||
-rw-r--r-- | transform/metainject/hugogenerator_test.go | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/transform/metainject/hugogenerator.go b/transform/metainject/hugogenerator.go index 20f05145b..fd3a6a4ab 100644 --- a/transform/metainject/hugogenerator.go +++ b/transform/metainject/hugogenerator.go @@ -25,7 +25,7 @@ import ( var ( metaTagsCheck = regexp.MustCompile(`(?i)<meta\s+name=['|"]?generator['|"]?`) - hugoGeneratorTag = fmt.Sprintf(`<meta name="generator" content="Hugo %s" />`, hugo.CurrentVersion) + hugoGeneratorTag = fmt.Sprintf(`<meta name="generator" content="Hugo %s">`, hugo.CurrentVersion) ) // HugoGenerator injects a meta generator tag for Hugo if none present. diff --git a/transform/metainject/hugogenerator_test.go b/transform/metainject/hugogenerator_test.go index 1d6d7c4b9..415da61b3 100644 --- a/transform/metainject/hugogenerator_test.go +++ b/transform/metainject/hugogenerator_test.go @@ -39,10 +39,10 @@ func TestHugoGeneratorInject(t *testing.T) { META <foo /> </HEAD>`}, - {`<head><meta name="generator" content="Jekyll" /></head>`, `<head><meta name="generator" content="Jekyll" /></head>`}, - {`<head><meta name='generator' content='Jekyll' /></head>`, `<head><meta name='generator' content='Jekyll' /></head>`}, - {`<head><meta name=generator content=Jekyll /></head>`, `<head><meta name=generator content=Jekyll /></head>`}, - {`<head><META NAME="GENERATOR" content="Jekyll" /></head>`, `<head><META NAME="GENERATOR" content="Jekyll" /></head>`}, + {`<head><meta name="generator" content="Jekyll"></head>`, `<head><meta name="generator" content="Jekyll"></head>`}, + {`<head><meta name='generator' content='Jekyll'></head>`, `<head><meta name='generator' content='Jekyll'></head>`}, + {`<head><meta name=generator content=Jekyll></head>`, `<head><meta name=generator content=Jekyll></head>`}, + {`<head><META NAME="GENERATOR" content="Jekyll"></head>`, `<head><META NAME="GENERATOR" content="Jekyll"></head>`}, {"", ""}, {"</head>", "</head>"}, {"<head>", "<head>\n\tMETA"}, |