Re: <pre> versus <code> white-space:pre; when pasting
Michael Shell <[email protected]> Wed, 20 Jul 2005 14:03:10 -0400
| Newsgroups | gmane.comp.mozilla.devel.unix |
|---|---|
| Organization | http://newsguy.com |
| Message-ID | <20050720140310.11678052@bashir> |
On 20 Jul 2005 02:13:31 -0700 "[email protected]" <[email protected]> wrote: > Also, I just tried your source out, and it looks like it works fine to > me, in firefox and in IE: This is not about how it *appears* in Firefox. It is about what happens when the code is highlighted and *pasted* into another application (say, when somebody wants to grab a code segment from a web page for compilation/execution). Each of the two cases *look* the same in Firefox. However, they do not *paste* the same - try it with say, Word Pad. At any rate, thank you for showing me that they still look the same under Windows. On Wed, 20 Jul 2005 06:50:18 GMT Spartanicus <[email protected]> wrote: : <pre><code>foobar</code></pre> I missed that one. Interesting - one tag to indicate that it is code and another one to indicate that whitespace and line feeds are to be treated as content. : Hardly. Well, a further issue is whether the browser should take into consideration presentation when pasting. After all, the pasting occurs after the document has been visually rendered - and the selection operation is working from this rendered data, not the HTML (and CSS) that gave rise to it. Thanks, Mike Shell