From 53a6a8f50ed445f6f2ff5141ac2f32ff179615e3 Mon Sep 17 00:00:00 2001 From: paku Date: Thu, 3 Oct 2024 14:17:16 +0900 Subject: [PATCH] Format --- src/utils.lisp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/utils.lisp b/src/utils.lisp index d03b444..7285969 100644 --- a/src/utils.lisp +++ b/src/utils.lisp @@ -29,25 +29,25 @@ (or (gethash char escape-map) char)) -(defun escape-string (string escape-map) - (if (stringp string) - (with-output-to-string (s) +(defun escape-string (str escape-map) + (if (stringp str) + (with-output-to-string (out) (loop - :for c :across string - :do (write (escape-char c escape-map) :stream s :escape nil))) - string)) + :for c :across str + :do (write (escape-char c escape-map) :stream out :escape nil))) + str)) -(defun escape-html-text-content (text) - (escape-string text *text-content-escape-map*)) +(defun escape-html-text-content (str) + (escape-string str *text-content-escape-map*)) -(defun escape-html-attribute (text) - (escape-string text *attribute-escape-map*)) +(defun escape-html-attribute (str) + (escape-string str *attribute-escape-map*)) -(defun minify (input-string) +(defun minify (str) (with-output-to-string (out) (let ((previous-space-p nil)) (loop - :for char :across input-string + :for char :across str :do (cond ((whitespace-p char) (unless previous-space-p