Htmlizer implementation

This commit is contained in:
maddiebaka committed 2023-08-03 17:31:14 -04:00
1 parent 9c99732c24
commit 26cbb6d345
4 files changed
+85 -7

No files matched your search

+3 -4
View File
@@ -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