Changeset main,3
- Timestamp:
- 02/05/2008 07:03:19 PM (18 years ago)
- branch-nick:
- tags
- revision id:
- dsowen@fugue88.ws-20080205190319-ua05iw3kwktv81m1
- Location:
- main
- Files:
-
- 1 added
- 1 edited
-
dso-tags.asd (added)
-
tags.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
main/tags.lisp
r2 r3 1 1 (defpackage #:dso-tags 2 (:use #:cl )3 (:export #: expand-tag #:render-tag #:render#:do-body))2 (:use #:cl #:cl-ppcre) 3 (:export #:*tag-out* #:expand-tag #:render-tag #:do-body)) 4 4 5 5 (in-package #:dso-tags) … … 7 7 8 8 9 (defvar *tag-out* nil)9 (defvar *tag-out* t) 10 10 11 11 … … 34 34 (etypecase item 35 35 (string 36 (format t "~A" item))36 (format *tag-out* "~A" (regex-replace-all "([^ ]) ([^ ])" item "\\1 \\2"))) 37 37 (list 38 38 (multiple-value-bind (tag-name tag-body tag-attrs) (break-tag item) … … 46 46 (defun render-empty-tag (tag body args) 47 47 (assert (null body)) 48 (format t"<~(~A~)~{ ~(~A~)='~A'~}/>" tag args))48 (format *tag-out* "<~(~A~)~{ ~(~A~)='~A'~}/>" tag args)) 49 49 50 50 (defun render-simple-tag (tag body args) 51 51 (if body 52 52 (progn 53 (format t"<~(~A~)~{ ~(~A~)='~A'~}>" tag args)53 (format *tag-out* "<~(~A~)~{ ~(~A~)='~A'~}>" tag args) 54 54 (do-body body) 55 (format t"</~(~A~)>" tag))55 (format *tag-out* "</~(~A~)>" tag)) 56 56 (render-empty-tag tag body args))) 57 57
Note: See TracChangeset
for help on using the changeset viewer.
