Skip to content

Commit

Permalink
[skip ci] Explicitly specify encoding for doc builds
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 committed Jan 7, 2022
1 parent 0234b89 commit fa3ec4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1012,11 +1012,11 @@ def run(config)
if page[:folder]
content = preamble.rstrip + "\n"
else
content = File.read(File.join(WIKI_PATH, page[:path]))
content = File.read(File.join(WIKI_PATH, page[:path]), encoding: Encoding::UTF_8)
content = preamble + content
content = link_corrector.rerender(content)
end
File.write(new_path, content, mode: 'w')
File.write(new_path, content, mode: 'w', encoding: Encoding::UTF_8)
end

# Now that the docs folder is created, time to move the home.md file out
Expand All @@ -1029,7 +1029,7 @@ def link_corrector_for(config)
link_corrector = LinkCorrector.new(config)
config.each do |page|
unless page[:folder]
content = File.read(File.join(WIKI_PATH, page[:path]))
content = File.read(File.join(WIKI_PATH, page[:path]), encoding: Encoding::UTF_8)
link_corrector.extract(content)
end
end
Expand Down

0 comments on commit fa3ec4a

Please sign in to comment.