Permalink
Browse files

Force content files to UTF-8 encoding to make them working under ngin…

…x+passenger.
  • Loading branch information...
1 parent 52d064a commit 6827382ebe9d05fb34fbcd564f2e12813adafd97 @jcoglan jcoglan committed May 13, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/showoff.rb
View
@@ -146,6 +146,7 @@ def empty?
def process_markdown(name, content, static=false, pdf=false)
# if there are no !SLIDE markers, then make every H1 define a new slide
+ content.force_encoding('UTF-8') if content.respond_to?(:force_encoding)
unless content =~ /^\<?!SLIDE/m
content = content.gsub(/^# /m, "<!SLIDE>\n# ")
end

1 comment on commit 6827382

it's great!

Please sign in to comment.