diff --git a/run.lisp b/run.lisp index 4f05fdc..6b4608e 100644 --- a/run.lisp +++ b/run.lisp @@ -118,7 +118,8 @@ (let ((string (escaped-string-value string))) (when (or (string^= " " string) ;; Don't insert spaces before punctuation. - (not (alpha-char-p (alexandria:first-elt string)))) + (and (not (alexandria:emptyp string)) + (not (alpha-char-p (alexandria:first-elt string))))) (cancel-space))) (call-next-method) (values)) diff --git a/tests.lisp b/tests.lisp index 92040f3..176da3d 100644 --- a/tests.lisp +++ b/tests.lisp @@ -850,3 +850,7 @@ bar" (spinneret:with-html-string (:span "Click the " (:a :href "https://google.com" ) ".")) "Click the ."))) + +(test html-tag-empty-string + (finishes + (spinneret:with-html-string (:style ""))))