Skip to content

Commit

Permalink
Force content files to UTF-8 encoding to make them working under ngin…
Browse files Browse the repository at this point in the history
…x+passenger.
  • Loading branch information
jcoglan committed May 13, 2012
1 parent 52d064a commit 6827382
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/showoff.rb
Expand Up @@ -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
Expand Down

1 comment on commit 6827382

@sibylgill
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's great!

Please sign in to comment.