Htmlizer implementation
This commit is contained in:
@@ -5,8 +5,8 @@ SERVE_DIR="/Users/madeline/Code/gemini-bridge-rack/gemini"
|
||||
class SkeksisApp
|
||||
def call(env)
|
||||
status = 200
|
||||
#headers = { "Content-Type" => "text/html" }
|
||||
headers = {}
|
||||
headers = { "content-type" => "text/html" }
|
||||
#headers = {}
|
||||
body = resolve_path(SERVE_DIR + env['PATH_INFO'])
|
||||
|
||||
[status, headers, body]
|
||||
@@ -18,8 +18,7 @@ class SkeksisApp
|
||||
elsif File.exist?(path)
|
||||
file = File.open(path, 'r')
|
||||
data = file.readlines
|
||||
Skeksis::Parser.parse(data)
|
||||
data
|
||||
[Skeksis.htmlize(data)]
|
||||
else # path is invalid
|
||||
return nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user