From 41516792d4524d33e1f7b1170d2eb57952017f95 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Tue, 10 Apr 2012 14:15:26 +0300 Subject: add :TEXTAREA to *HTML-NO-INDENT-TAGS* Also make the docstring follow the phrasing used elsewhere more closely. --- specials.lisp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specials.lisp b/specials.lisp index c731a78..9cf065d 100755 --- a/specials.lisp +++ b/specials.lisp @@ -65,8 +65,9 @@ needs to output case sensitive XML.") "End of an empty tag. Default is XML style.") (defvar *html-no-indent-tags* - '(:pre) - "List of HTML tags that disable indentation inside them. Default list containts only :PRE.") + '(:pre :textarea) + "The list of HTML tags that should disable indentation inside them. The initial +value is a list containing only :PRE and :TEXTAREA.") (defvar *html-empty-tags* '(:area -- cgit v1.2.3 From d1475440828123bf27a9a1f5ff977f92769e8e64 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Tue, 10 Apr 2012 13:50:57 +0300 Subject: delete trailing whitespace from documentation --- doc/index.html | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/index.html b/doc/index.html index c38da09..4871cb2 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,5 +1,5 @@ - + @@ -9,16 +9,16 @@ h3, h4 { text-decoration: underline; } a { text-decoration: none; padding: 1px 2px 1px 2px; } a:visited { text-decoration: none; padding: 1px 2px 1px 2px; } - a:hover { text-decoration: none; padding: 1px 1px 1px 1px; border: 1px solid #000000; } + a:hover { text-decoration: none; padding: 1px 1px 1px 1px; border: 1px solid #000000; } a:focus { text-decoration: none; padding: 1px 2px 1px 2px; border: none; } a.none { text-decoration: none; padding: 0; } - a.none:visited { text-decoration: none; padding: 0; } - a.none:hover { text-decoration: none; border: none; padding: 0; } - a.none:focus { text-decoration: none; border: none; padding: 0; } - a.noborder { text-decoration: none; padding: 0; } - a.noborder:visited { text-decoration: none; padding: 0; } - a.noborder:hover { text-decoration: none; border: none; padding: 0; } - a.noborder:focus { text-decoration: none; border: none; padding: 0; } + a.none:visited { text-decoration: none; padding: 0; } + a.none:hover { text-decoration: none; border: none; padding: 0; } + a.none:focus { text-decoration: none; border: none; padding: 0; } + a.noborder { text-decoration: none; padding: 0; } + a.noborder:visited { text-decoration: none; padding: 0; } + a.noborder:hover { text-decoration: none; border: none; padding: 0; } + a.noborder:focus { text-decoration: none; border: none; padding: 0; } pre.none { padding:5px; background-color:#ffffff } @@ -315,7 +315,7 @@ string to the stream the user provides.
  • Each list beginning with a keyword -is transformed into an (X)HTML tag of the same (usually downcased) name by the following rules: +is transformed into an (X)HTML tag of the same (usually downcased) name by the following rules:
      @@ -337,7 +337,7 @@ is transformed into an (X)HTML tag of the same (usually
      (:td :nowrap t) => (write-string "<td nowrap='nowrap' />" s)
      With HTML-MODE set to :SGML: - +
      (:td :nowrap t) => (write-string "<td nowrap>" s)
    • If it is NIL the attribute will be left out completely. @@ -415,7 +415,7 @@ CHECKBOX
    • Forms that look like (str form) will be substituted with (let ((result form)) (when result (princ result s))). -
      (loop for i below 10 do (str i)) => 
      +
      (loop for i below 10 do (str i)) =>
       (loop for i below 10 do
          (let ((#:result i))
            (when #:result (princ #:result *standard-output*))))
      @@ -717,17 +717,17 @@ Here are some simple examples:
       * (defmethod convert-tag-to-string-list ((tag (eql :red)) attr-list body body-fn)
           (declare (ignore attr-list))
      -    (nconc (cons "<font color='red'>" (funcall body-fn body)) (list "</font>"))) 
      -; Compiling LAMBDA (PCL::.PV-CELL. PCL::.NEXT-METHOD-CALL. TAG ATTR-LIST BODY BODY-FN): 
      -; Compiling Top-Level Form: 
      +    (nconc (cons "<font color='red'>" (funcall body-fn body)) (list "</font>")))
      +; Compiling LAMBDA (PCL::.PV-CELL. PCL::.NEXT-METHOD-CALL. TAG ATTR-LIST BODY BODY-FN):
      +; Compiling Top-Level Form:
       
       #<STANDARD-METHOD CONVERT-TAG-TO-STRING-LIST ((EQL :RED) T T T) {582B268D}>
       * (with-html-output (*standard-output*)
      -    (:red (:b "Bold and red")) 
      +    (:red (:b "Bold and red"))
           (values))
       <font color='red'><b>Bold and red</b></font>
       * (show-html-expansion (s)
      -    (:red :style "spiffy" (if (foo) (htm "Attributes are ignored")))) 
      +    (:red :style "spiffy" (if (foo) (htm "Attributes are ignored"))))
       
       (LET ((S S))
         (PROGN
      @@ -746,24 +746,24 @@ Here are some simple examples:
                                           collect "<td>"
                                           when (constantp col)
                                             collect (format nil "~A" col)
      -                                    else 
      +                                    else
                                             collect col
                                           collect "</td>")
                               collect "</tr>")
                         (list "</table>")))
      -          (t 
      +          (t
                   ;; you could as well invoke CALL-NEXT-METHOD here, of course
                   (nconc (cons "<table "
                                (convert-attributes attr-list))
                          (list ">")
                          (funcall body-fn body)
                          (list "</table>")))))
      -; Compiling LAMBDA (PCL::.PV-CELL. PCL::.NEXT-METHOD-CALL. TAG ATTR-LIST BODY BODY-FN): 
      -; Compiling Top-Level Form: 
      +; Compiling LAMBDA (PCL::.PV-CELL. PCL::.NEXT-METHOD-CALL. TAG ATTR-LIST BODY BODY-FN):
      +; Compiling Top-Level Form:
       
       #<STANDARD-METHOD CONVERT-TAG-TO-STRING-LIST ((EQL :TABLE) T T T) {58AFB7CD}>
       * (with-html-output (*standard-output*)
      -    (:table :border 0 (:tr (:td "1") (:td "2")) (:tr (:td "3") (:td "4")))) 
      +    (:table :border 0 (:tr (:td "1") (:td "2")) (:tr (:td "3") (:td "4"))))
       <table  border='0'><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>
       "</td></tr></table>"
       * (show-html-expansion (s)
      -- 
      cgit v1.2.3
      
      
      From 41a07deefbc6ac865d4ef028122ea0745d6f94b0 Mon Sep 17 00:00:00 2001
      From: Nikodemus Siivola 
      Date: Tue, 10 Apr 2012 14:10:16 +0300
      Subject: order special variables in the documentation alphabetically
      
      ---
       doc/index.html | 20 ++++++++++----------
       1 file changed, 10 insertions(+), 10 deletions(-)
      
      diff --git a/doc/index.html b/doc/index.html
      index 4871cb2..151a2ee 100644
      --- a/doc/index.html
      +++ b/doc/index.html
      @@ -90,10 +90,10 @@ CL-WHO is for example used by clutu and with-html-output
           
    • with-html-output-to-string
    • *attribute-quote-char* -
    • *prologue* +
    • *downcase-tokens-p*
    • *html-empty-tag-aware-p*
    • *html-empty-tags* -
    • *downcase-tokens-p* +
    • *prologue*
    • esc
    • fmt
    • htm @@ -527,12 +527,12 @@ This character is used as the quote character when building attributes. Defaults


      [Special variable] -
      *prologue* +
      *downcase-tokens-p*


      -This is the prologue string which will be printed if the prologue keyword argument to WITH-HTML-OUTPUT is T. Gets changed when you set HTML-MODE. Its initial value is - -
      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
      +If the value of this variable is NIL, keyword symbols representing a tag or attribute name will not be +automatically converted to lowercase. This is useful when one needs to +output case sensitive XML. The default is T.


      [Special variable] @@ -560,12 +560,12 @@ The initial value is the list


      [Special variable] -
      *downcase-tokens-p* +
      *prologue*


      -If the value of this variable is NIL, keyword symbols representing a tag or attribute name will not be -automatically converted to lowercase. This is useful when one needs to -output case sensitive XML. The default is T. +This is the prologue string which will be printed if the prologue keyword argument to WITH-HTML-OUTPUT is T. Gets changed when you set HTML-MODE. Its initial value is + +
      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"


      [Symbol] -- cgit v1.2.3 From da7c6eeb3f3364939154d7c547b5c50b0ce587e6 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Tue, 10 Apr 2012 14:14:30 +0300 Subject: document *HTML-NO-INDENT-TAGS* --- doc/index.html | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/doc/index.html b/doc/index.html index 151a2ee..50b0627 100644 --- a/doc/index.html +++ b/doc/index.html @@ -93,6 +93,7 @@ CL-WHO is for example used by clutu and *downcase-tokens-p*

    • *html-empty-tag-aware-p*
    • *html-empty-tags* +
    • *html-no-indent-tags*
    • *prologue*
    • esc
    • fmt @@ -460,21 +461,26 @@ time. prologue should be a string is guaranteed to be the first thing sent to the stream from within the body of this macro. If prologue is T the prologue string is the value -of *PROLOGUE*. CL-WHO will -usually try not to insert any unnecessary whitespace in order to save -bandwidth. However, if indent is true -line breaks will be inserted and nested tags will be indented -properly. The value of indent - if it is an -integer - will be taken as the initial indentation. If it is not an -integer it is assumed to mean 0. (But note that -indentation might change the semantics of the generated HTML. This is -for example the case for the PRE -and TEXTAREA tags, and in certain situations additional -whitespace might also change the layout of tables.) +of *PROLOGUE*. +

      +CL-WHO will usually try not to insert any unnecessary whitespace in +order to save bandwidth. However, if indent +is true line breaks will be inserted and nested tags will be +indented properly. The value of indent - if it is +an integer - will be taken as the initial indentation. If it is not an +integer it is assumed to mean 0. Value +of *HTML-NO-INDENT-TAGS* +controls which tag-contents are excempt from indentation: by default +contents of PRE and TEXTAREA tags are not +indented to avoid spurious layout changes. (Note: in certain +situations additional whitespace may change the layout of tables.) +

      The results are the values returned by the forms.

      -Note that the keyword arguments prologue and indent are used at macro expansion time. +Note that the keyword arguments prologue +and indent, and the associated variables are +used at macro expansion time.

       * (with-html-output (*standard-output* nil :prologue t)
      @@ -559,6 +565,15 @@ The initial value is the list
       
      +


      [Special variable] +
      *html-no-indent-tags* + +


      +The list of HTML tags that should disable indentation inside them even +when indentation is requested. The initial value is a list containing +only :pre and :texarea. +
      +


      [Special variable]
      *prologue* -- cgit v1.2.3