diff options
-rw-r--r-- | package.lisp | 1 | ||||
-rw-r--r-- | pastiche.lisp | 27 |
2 files changed, 14 insertions, 14 deletions
diff --git a/package.lisp b/package.lisp index 2e317e7..4e6ef74 100644 --- a/package.lisp +++ b/package.lisp @@ -9,6 +9,7 @@ #:<body> #:<head> #:<h4> + #:<br> #:<a> #:<pre> #:@) diff --git a/pastiche.lisp b/pastiche.lisp index d768b42..01ea05a 100644 --- a/pastiche.lisp +++ b/pastiche.lisp @@ -2,7 +2,7 @@ (in-package #:pastiche) -;;; SERVICE CONFIG, STARTING, STOPPING +;;; SERVICE CONFIG, STARTING, STOPPING (def:var *config* :init nil @@ -188,15 +188,18 @@ from make-paste-filename.")) paste :when= (or (lookup-paste id) (http:not-found instance)) filename := (merge-pathnames (filename paste) (paste-path*)) content := (a:read-file-into-string filename) - (with-output-to-string (out) - (html:html - (<html> - (<body> - (<a> (@ :href (http:route-to 'raw-paste :id id)) - "raw") - (<h4> (title paste)) - (<pre> (escape-html-in-paste-content content)))) - out)))) + page := (<html> + (<body> + (<a> (@ :href (http:route-to 'new-paste-form)) + "new paste") + <br> + (<a> (@ :href (http:route-to 'raw-paste :id id)) + "raw") + (<h4> (title paste)) + (<pre> + (escape-html-in-paste-content content)))) + + (html:html-string page :pretty nil))) (http:defendpoint create-paste @@ -245,7 +248,3 @@ from make-paste-filename.")) html:<br> (html:<button> "Paste")))) out))) - - - - |