Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rdoc/generator/darkfish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def assemble_template(body_file)
<<-TEMPLATE
<!DOCTYPE html>

<html>
<html lang="#{@options.locale&.name || 'en'}">
<head>
#{head_file.read}

Expand Down
15 changes: 15 additions & 0 deletions test/rdoc/rdoc_generator_darkfish_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,21 @@ def test_template_stylesheets
assert_include File.binread('index.html'), %Q[href="./#{base}"]
end

def test_html_lang
@g.generate

content = File.binread("index.html")
assert_include(content, '<html lang="en">')
end

def test_html_lang_from_locale
@options.locale = RDoc::I18n::Locale.new 'ja'
@g.generate

content = File.binread("index.html")
assert_include(content, '<html lang="ja">')
end

def test_title
title = "RDoc Test".freeze
@options.title = title
Expand Down
Loading