"Pre" Tags May 7, 2004 4:14 AM   Subscribe

HTML "Pre" Tag Pony. Entering Computer Code in AskMetafilter is hard. I've tried to use the "pre" tag, and just putting the code in, but the MeFi Comments Post Processor insists on putting "br" tags on the end of each line. This results in double spaced code. Is it possible for the Comments Post Processor to not generate "br" tags if inside a "pre" tag block.
posted by seanyboy to Bugs at 4:14 AM (12 comments total)

An Example....
First Line of Code
Second Line of Code

gives us .....
First Line of Code
    Second Line of Code
posted by seanyboy at 4:18 AM on May 7, 2004

I'll chip in for some nagging for that pony... It's only caused me a problem once, but it was enough to stop me posting.
posted by twine42 at 4:19 AM on May 7, 2004

Use the <code> luke!

First Line
Second Line

posted by sebas at 4:30 AM on May 7, 2004

Or seanyboy actually. Not luke. Stupid silly movie references.
posted by sebas at 4:31 AM on May 7, 2004

Example using the code tag
Note indented line...
Example using the pre tag
       Note indented line...
posted by seanyboy at 4:39 AM on May 7, 2004

how aboutexplicitline breaks, but nonew lines?
(for some mad mad reason you must use <br> and not </br>)
anyways, as has been discussed before, the whole auto-br thing is madness (a youthful coding indiscretion ;o) and should be replaced by code that groups paragraphs by blank lines.
posted by andrew cooke at 4:41 AM on May 7, 2004

(which handle   indent too)
<pre>(which handle<br>   indent too)</pre>
posted by andrew cooke at 4:45 AM on May 7, 2004

Yes, but if you are copying some code into the comment window, do you want to replace all lines with a <br> tag?

I guess a small pony is in order, perhaps we can have a <pony> tag for requests?
posted by sebas at 4:49 AM on May 7, 2004

aside. If you're copying code into a comment window, you probably shouldn't be posting in the first place.
posted by DrJohnEvans at 9:15 AM on May 7, 2004

DrJohnEvans: Ever been to AskMeFi? And there's even the odd MeFi thread where pasting code is quite appropriate.

posted by fvw at 9:39 AM on May 7, 2004

Personal preference, I suppose: when contributing code ideas, I type-as-I-think in the comment submission form. It tends to keep my formatting simple, high-level, and within the limits of MeFi code presentation (which are being analyzed in this very thread). I would also hesitate to use existing code in a comment, as that brings with it a host of potential contextual problems. MetaFilter code snippets would usually be more high-level than what copy-and-pasted stuff would provide.

Of course, the exception is simple, non-contextual stuff like CSS, which could be copied and pasted with no problem. And now that I think of it, the majority of coding questions in AskMeFi deal with such code. So the behaviour of the majority wasn't the behaviour I was making fun of in my generalizing statement. Nothing new there.</nosnark>

Of course, the simplest solution to this problem is to turn the comment submission form into a full-featured IDE. Visual MeFi++ Studio?
posted by DrJohnEvans at 10:23 AM on May 7, 2004

hey man, once we get .NET and XML, we can turn this sucker into one big friggin Word document!
posted by quonsar at 2:05 PM on May 7, 2004

« Older Economics knowledge dropped   |   server donation request Newer »

You are not logged in, either login or create an account to post comments