Added hyphen to underscore coersion

This commit is contained in:
Aaron Gustafson 2017-04-03 20:04:29 -04:00
parent a2f64d46c3
commit 8a8a5e9859
2 changed files with 10 additions and 2 deletions

View File

@ -111,7 +111,7 @@
<meta name="author" content="{{ seo_author_name }}" />
{% endif %}
<meta property="og:locale" content="{{ seo_page_lang }}" />
<meta property="og:locale" content="{{ seo_page_lang | replace:'-','_' }}" />
{% if seo_description %}
<meta name="description" content="{{ seo_description }}" />
@ -128,7 +128,6 @@
{% endif %}
{% if seo_page_image %}
<meta property="og:image" content="{{ seo_page_image }}" />
{% if page.image.height %}
<meta property="og:image:height" content="{{ page.image.height }}" />

View File

@ -606,5 +606,14 @@ EOS
end
end
end
context "with site.lang hyphenated" do
let(:site) { make_site("lang" => "en-US") }
it "coerces hyphen to underscore" do
expected = %r!<meta property="og:locale" content="en_US" />!
expect(output).to match(expected)
end
end
end
end