We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ecaea5 commit 5858b00Copy full SHA for 5858b00
desk/app/scratch/view.hoon
@@ -25,17 +25,13 @@
25
=/ =file (~(got by pile) key)
26
=/ norm=tape (scan (trip text.file) (star ;~(pose (cold '\\`' (just '`')) next)))
27
^- reply:rudder
28
+ ?: =(%html view.file)
29
+ =/ hdr=response-header:http [200 ~[['content-type' 'text/html']]]
30
+ =/ =octs (as-octs:mimes:html text.file)
31
+ [%full [hdr `octs] &]
32
|^ [%page page &]
33
++ page
34
:: compile
- ?: =(%html view.file)
- ?~ content=(de-xml:html text.file)
- ;html
- ;body
35
- ;div: Unable to parse HTML
36
- ==
37
38
- u.content
39
?< ?=(%html view.file)
40
%^ template q.byk.bowl "{(trip key)} | scratch"
41
:~ ;script: {data}
0 commit comments