(defun fancy-format (s) (format nil "~a" (with-output-to-string (o) (loop for c across s
do (format o (case c ((#[b]([/b] #[b])[/b]) "~a") (t "~a"))
c)))))
(defun write-tag (tag s) (format nil "[~a]~a[/~a]" tag s tag)) (defun fancy-format (s) (write-tag "m" (with-output-to-string (o) (loop for c across s
do (princ (case c ((#[b]([/b] #[b])[/b])(write-tag "b" c)) (t c))
o)))))
(defun write-tag (tag s) (format nil "[~a]~a[/~a]" tag s tag))
(defun fancy-format (s) (write-tag "m" (with-output-to-string (o) (loop for c across s
do (princ (case c (("[b]([/b] "[b])[/b])(write-tag "b" c)) (t c))
o)))))
(defun write-tag (tag s) (format nil "[~a]~a[/~a]" tag s tag))
(defun fancy-format (s) (write-tag "m" (with-output-to-string (o) (loop for c across s
do (princ (case c ((#[b]([/b] #[b])[/b])(write-tag "b" c)) (t c))
o)))))
(defun write-tag (tag s) (format nil "[~a]~a[/~a]" tag s tag))
(defun escape-slash (s) (substitute "\" "\\" s))
(defun fancy-format (s) (escape-slash (write-tag "m" (with-output-to-string (o) (loop for c across s
do (princ (case c ((#[b]([/b] #[b])[/b])(write-tag "b" c)) (t c))
o))))))