From 8d7d8b26a10f1c4deb59ee9a48ef95d54fdd7a9b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 3 Jun 2023 11:59:23 -0700 Subject: README: stray tabs to spaces --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 49f467e..64dac8e 100644 --- a/README.md +++ b/README.md @@ -262,27 +262,27 @@ Simple example: Complex example, adapted from Spinneret documentation: ::text - (deftag :easy-input (label (name (gensym)) - (id name) (type "text") . other-attrs) default - ^(progn - (:label :for ,name ,label) - (:input :name ,name :id ,id :type ,type - ,*other-attrs :value (progn ,*default)))) + (deftag :easy-input (label (name (gensym)) + (id name) (type "text") . other-attrs) default + ^(progn + (:label :for ,name ,label) + (:input :name ,name :id ,id :type ,type + ,*other-attrs :value (progn ,*default)))) Note that `progn` here isn't the Lisp `progn` operator; it is recognized by the `deftag` expansion mechanism as a way of producing multiple elements. To invoke `:easy-input`, we might do this: ::text - 5> (with-html-output (*stdout* nil :indent t) - (:div :class "cls" - (:easy-input :name "foo" :id "foo-23" + 5> (with-html-output (*stdout* nil :indent t) + (:div :class "cls" + (:easy-input :name "foo" :id "foo-23" :style "style" :label "lab" "123"))) -
- - -
+
+ + +
Note a small flexibility: the `body` argument `"123"` of `:easy-input` wasn't inserted as an element in the middle of the tag as in the simple example, but -- cgit v1.2.3