File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -595,7 +595,7 @@ def assemble_template(body_file)
595595 <<-TEMPLATE
596596<!DOCTYPE html>
597597
598- <html>
598+ <html lang=" #{ @options . locale &. name || 'en' } " >
599599<head>
600600#{ head_file . read }
601601
Original file line number Diff line number Diff line change @@ -388,6 +388,21 @@ def test_template_stylesheets
388388 assert_include File . binread ( 'index.html' ) , %Q[href="./#{ base } "]
389389 end
390390
391+ def test_html_lang
392+ @g . generate
393+
394+ content = File . binread ( "index.html" )
395+ assert_include ( content , '<html lang="en">' )
396+ end
397+
398+ def test_html_lang_from_locale
399+ @options . locale = RDoc ::I18n ::Locale . new 'ja'
400+ @g . generate
401+
402+ content = File . binread ( "index.html" )
403+ assert_include ( content , '<html lang="ja">' )
404+ end
405+
391406 def test_title
392407 title = "RDoc Test" . freeze
393408 @options . title = title
You can’t perform that action at this time.
0 commit comments