diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-06-03 11:59:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-06-03 11:59:23 -0700 |
commit | 8d7d8b26a10f1c4deb59ee9a48ef95d54fdd7a9b (patch) | |
tree | 624ac42fd59371a1b1f6ccc7443261fb13f99bd5 | |
parent | 24b32d85ef065df962429d97df1d5ded973e1e26 (diff) | |
download | tl-who-8d7d8b26a10f1c4deb59ee9a48ef95d54fdd7a9b.tar.gz tl-who-8d7d8b26a10f1c4deb59ee9a48ef95d54fdd7a9b.tar.bz2 tl-who-8d7d8b26a10f1c4deb59ee9a48ef95d54fdd7a9b.zip |
README: stray tabs to spaces
-rw-r--r-- | README.md | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -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"))) - <div class='cls'> - <label for='foo'>lab - </label> - <input name='foo' id='foo-23' type='text' style='style' value='123' /> - </div> + <div class='cls'> + <label for='foo'>lab + </label> + <input name='foo' id='foo-23' type='text' style='style' value='123' /> + </div> 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 |