Hi,
I ran into some unexpected behavior this morning when using the pre directive. Here is an example:
(with-html-output (*standard-output* nil :prologue nil :indent t) (:body (:pre "This block of text should all be justified to the left edge of the window when rendered by a browser, even if the HTML itself is indented, no?")))
What is generated is the following:
<body> <pre> This block of text should all be justified to the left edge of the window when rendered by a browser, even if the HTML itself is indented, no? </pre> </body>
Which will "indent" the first line unexpectedly, as well as pre-pending an unexpected line break. I realize that I can turn off indenting in my output, but this seems inelegant. It seems like the pre directive needs to be handled as a special case.
--Jeff
On Sat, 29 Dec 2007 10:48:25 -0800, Jeff Cunningham jeffrey@cunningham.net wrote:
I realize that I can turn off indenting in my output, but this seems inelegant. It seems like the pre directive needs to be handled as a special case.
I don't agree. To me, the :INDENT argument is there mostly for the purpose of debugging. Also, there are other tags besides PRE which would also need special treatment.
Edi.
Edi Weitz wrote:
On Sat, 29 Dec 2007 10:48:25 -0800, Jeff Cunningham jeffrey@cunningham.net wrote:
I realize that I can turn off indenting in my output, but this seems inelegant. It seems like the pre directive needs to be handled as a special case.
I don't agree. To me, the :INDENT argument is there mostly for the purpose of debugging. Also, there are other tags besides PRE which would also need special treatment.
Edi. _______________________________________________
Such as? It doesn't seem wise to have a debugging mode that changes the behavior of what it is you are trying to debug. And its another thing to go wrong which seems unnecessary.
--Jeff
On Sat, 29 Dec 2007 11:40:01 -0800, Jeff Cunningham jeffrey@cunningham.net wrote:
Such as?
TEXTAREA, for example.
There are more. I don't remember the details, but I've had cases where whitespace between tags in tables changed the way the tables were rendered by certain browsers.
It doesn't seem wise to have a debugging mode that changes the behavior of what it is you are trying to debug.
I didn't say "debugging mode," I said that it's there for the purpose of debugging. I sometimes (rarely) use it if I want to look at the generated HTML. In production environments I always turn the indentation of.
CL-WHO is all about output and :INDENT T clearly changes the output.
Edi.
Edi Weitz wrote:
On Sat, 29 Dec 2007 11:40:01 -0800, Jeff Cunningham jeffrey@cunningham.net wrote:
Such as?
TEXTAREA, for example.
There are more. I don't remember the details, but I've had cases where whitespace between tags in tables changed the way the tables were rendered by certain browsers.
It doesn't seem wise to have a debugging mode that changes the behavior of what it is you are trying to debug.
I didn't say "debugging mode," I said that it's there for the purpose of debugging. I sometimes (rarely) use it if I want to look at the generated HTML. In production environments I always turn the indentation of.
CL-WHO is all about output and :INDENT T clearly changes the output.
Edi.
Fair enough. Might be nice to stick line in the 'with-html-output description like: "Note: indentation will change the behavior of certain HTML tags, such as <pre>, <textarea> and possibly others. "
Also, the word "indented" is misspelled in the sentence: "However, if |/indent/| is /true/ line breaks will be inserted and nested tags will be intended properly. " in the same paragraph.
--Jeff
On Sat, 29 Dec 2007 12:20:23 -0800, Jeff Cunningham jeffrey@cunningham.net wrote:
Fair enough. Might be nice to stick line in the 'with-html-output description like: "Note: indentation will change the behavior of certain HTML tags, such as <pre>, <textarea> and possibly others. "
I've update the online documentation accordingly. The documentation in the tarball will be updated with the next release.
Also, the word "indented" is misspelled in the sentence: "However, if |/indent/| is /true/ line breaks will be inserted and nested tags will be intended properly. " in the same paragraph.
Thanks, I've changed that as well.
Edi.