lib/nox.rb in nox-0.1.0 vs lib/nox.rb in nox-0.1.1
- old
+ new
@@ -16,9 +16,10 @@
desc "ghserver [PATH]", "Start a webserver that does GitHub markup"
method_option :port, type: :numeric, aliases: '-p', default: 8019, desc: 'Port'
def ghserver(path=Dir.getwd)
+ Encoding.default_internal = 'utf-8'
WEBrick::HTTPServlet::FileHandler.add_handler('md', ::Nox::GitHubRenderer)
WEBrick::HTTPServlet::FileHandler.add_handler('markdown', ::Nox::GitHubRenderer)
server = WEBrick::HTTPServer.new DocumentRoot: path, BindAddress: '0.0.0.0', Port: options.port
server.mount '/style.css', ::Nox::Styles