Join 3,558 readers in helping fund MetaFilter (Hide)

pre tag display issues
February 22, 2009 3:28 AM   Subscribe

Thank you for making <pre> tags work predictably and consistently between live preview, full preview, and posting. However..

Looks like all old uses of pre are now messed up..
Well, not all, which is a little confusing.
What was I trying to draw here?!?!?


Do we need a back<pre>tagging project? It would be a lot harder to implement, obviously.. Any ideas?
posted by Chuckles to Bugs at 3:28 AM (74 comments total) 1 user marked this as a favorite

Bug: there should be italics between these angle braces, <>but there are not>, and the first angle brace grows a close brace for no apparent reason.

Looks fine in the preview, though.
posted by Dunwitty at 3:33 AM on February 22, 2009


To get the above bug, type a sentence with text, then text between an open and close angle brace. Select the text between the braces and click the Italic button. Click Post Comment.
posted by Dunwitty at 3:34 AM on February 22, 2009


I don't think previous use of the PRE tag is worth the effort, since it was used mostly for ASCII jokes, the rest for programming issues, and even for the serious use people usually found a workaround when it didn't function as intended.
posted by mathowie (staff) at 7:49 AM on February 22, 2009


To get the above bug, type a sentence with text, then text between an open and close angle brace. Select the text between the braces and click the Italic button. Click Post Comment.

You just wrote broken HTML. Congrats, display bugs happen when you write HTML improperly. I bet I can reproduce that on most any blog CMS or publishing system.
posted by mathowie (staff) at 7:50 AM on February 22, 2009 [1 favorite]


                 .---.---.---.                        .---.     -----------------------
    .--..--..--./   /___/     \          .--.     ___/     \   |  Come, brethren! The  |
   /   /   /    `.-""   `-,    ;        /    `.-""   `-,    ;  | gates of paradise are |
   ;   ;   ;    /     O O  \  /        ;     /     O O  \  /   |    open once more!    |
   `.  `. `.    \          /-'         `.    \          /-'    | ----------------------
   _ J_ J_  J-.__;      _.'           _  J-.__;      _.'       |/
  (" (" (" /      `.   -=:           (" /      `.   -=:
   `: `: `:         `, -=|            `:         `, -=| 
   O| O| O|  F\    i, ; -|            O|  F\    i, ; -|
  O  O  O |  | |   ||  \_J           O |  | |   ||  \_J
OOOOOOOOOO mmm! `mmM Mmm'          OOOO mmm! `mmM Mmm'
posted by Krrrlson at 8:38 AM on February 22, 2009 [12 favorites]


You just wrote broken HTML. Congrats, display bugs happen when you write HTML improperly. I bet I can reproduce that on most any blog CMS or publishing system.
OH SNAP!
posted by ALongDecember at 8:54 AM on February 22, 2009


                _         __ _ _ _            
 _ __ ___   ___| |_ __ _ / _(_) | |_ ___ _ __ 
| '_ ` _ \ / _ \ __/ _` | |_| | | __/ _ \ '__|
| | | | | |  __/ || (_| |  _| | | ||  __/ |   
|_| |_| |_|\___|\__\__,_|_| |_|_|\__\___|_|   
                                              
Heh, I'm feeling very usenet-ish with this...
posted by Argyle at 8:55 AM on February 22, 2009 [4 favorites]


Looks fine in the preview, though.

Keep in mind we have two ways to preview your comments: Live Preview below the comment area and the "Preview" button that shows your text on the page (HTML Preview). Live Preview is an approximation that uses a clever JavaScript hack to show the text—it doesn't pass your text through our HTML parser that tries to make sure your HTML is valid. It wouldn't be feasable to add this check every time a new character is added to your comment, so we have these two methods.

Live Preview is great if your comment is all text. But if you're doing any sort of HTML formatting, I highly recommend clicking the "Preview" button before you comment.

And if you need to write a word in angle brackets, you should write the brackets as HTML entities like so: &lt; produces < and &gt; produces > on the page. Otherwise our HTML parser will assume you're trying to write HTML when you use angle brackets. And here's our FAQ entry on this topic: Live Preview vs. HTML Preview.
posted by pb (staff) at 9:00 AM on February 22, 2009 [1 favorite]


Wait, there's an italic button? Well I'll be! I've been writing comments for over two years and never even noticed the little dealies down there!
posted by DU at 9:22 AM on February 22, 2009


You think this is funny, Chuckles?
posted by pwally at 9:29 AM on February 22, 2009


Daaaang. It would take me roughly 13 hours to write Metafilter like that. Your brain is very different from mine.
posted by iamkimiam at 9:32 AM on February 22, 2009


Bug: there should be italics between these angle braces, <>but there are not>, and the first angle brace grows a close brace for no apparent reason.

Like mathowie (and pb) said, this 'bug' happens because you're not writing italics between angle braces, you're writing bad HTML. If you want to use angle brackets around stuff you're typing, etc, you have to use the html entities for the characters. These always start with an ampersand (&) and end with a semi-colon (;).

To display this
<italics>
type this exactly:
&lt;<i>italics</i>&gt;

There are lots of big lists of character entities that you can reference in case you run into similar problems again or just want something to fool around with.
posted by carsonb at 9:37 AM on February 22, 2009


It would take me roughly 13 hours to write Metafilter like that. Your brain is very different from mine.
    ___    _____  _____   ____   _
\  |   |  /    /  \    \  \  /  / 
 |  \_/  |    /    \    \  \/  /  
 |   _   |   /  []  \    >    <   
 |  / \  |  |   __   |  /  /\  \  
/  |___|  \_|  (__)  |_/  /__\  \_
posted by cortex (staff) at 10:24 AM on February 22, 2009 [2 favorites]


              _
             \`\
             |= |
            /-  ;.---.
      _ __.'     (____)
       `         (_____)
       _'  ._ .' (____)
        `        (___)
       --`'------'`
posted by brundlefly at 10:24 AM on February 22, 2009


                __          _____.__.__   __                                                  .___                         __  .__         
  _____   _____/  |______ _/ ____\__|  |_/  |_  ___________     _      __ __  ______ ____   __| _/   _____   ____  _______/  |_|  | ___.__.
 /     \_/ __ \   __\__  \\   __\|  |  |\   __\/ __ \_  __ \   (_)    |  |  \/  ___// __ \ / __ |   /     \ /  _ \/  ___/\   __\  |<> )___ \  |  | |  |_\___  |
|__|_|  /\___  >__| (____  /__|  |__|____/__|  \___  >__|      (_)    |____//____  >\___  >____ |  |__|_|  /\____/____  > |__| |____/ ____|
      \/     \/          \/                        \/                            \/     \/     \/        \/           \/            \/     
  _____                 _____    __________________ .___.___       __        __                  
_/ ____\___________    /  _  \  /   _____/\_   ___ \|   |   |     |__| ____ |  | __ ____   ______
\   __\/  _ \_  __ \  /  /_\  \ \_____  \ /    \  \/|   |   |     |  |/  _ \|  |/ // __ \ /  ___/
 |  | (  <> )  | \/ /    |    \/        \\     \___|   |   |     |  (  <> )    <>____  >
                             \/        \/         \/          \______|           \/    \/     \/ 
posted by the latin mouse at 11:03 AM on February 22, 2009


Damnit!
posted by the latin mouse at 11:04 AM on February 22, 2009 [2 favorites]


     _             ______   __     __  ___     ___        __      ____      __ 
 /  /_| /|/|  /| )/  )/    (  /  //__)(_    / (_  /| )  //  )(__/  /  )__//(   
(  (  |/   | / |/(__/(    __)(__// (  /__  (  /__/ |/(_/(__/  /   (  /  /(__)  
                                                                               
 ___ ___ _ ____     __  ___ 
(_  (_  /_| /  /  //__)(_   
/   /__(  |(  (__// (  /__  
                            
posted by The Whelk at 11:33 AM on February 22, 2009 [1 favorite]


You just wrote broken HTML.

Except I didn't. All those linked comments looked fine when I posted them.
posted by Chuckles at 11:36 AM on February 22, 2009


Also, while the <pre> behaviour is fixed when viewing threads, it is the same as it always was in Recent Activity. Kind of funny, but that one doesn't seem too important.
posted by Chuckles at 11:40 AM on February 22, 2009


............................................________
....................................,.-‘”...................``~.,
.............................,.-”...................................“-.,
.........................,/...............................................”:,
.....................,?......................................................\,
.................../...........................................................,}
................./......................................................,:`^`..}
.............../...................................................,:”........./
..............?.....__.........................................:`.........../
............./__.(.....“~-,_..............................,:`........../
.........../(_....”~,_........“~,_....................,:`........_/
..........{.._$;_......”=,_.......“-,_.......,.-~-,},.~”;/....}
...........((.....*~_.......”=-._......“;,,./`..../”............../
...,,,___.\`~,......“~.,....................`.....}............../
............(....`=-,,.......`........................(......;_,,-”
............/.`~,......`-...............................\....../\
.............\`~.*-,.....................................|,./.....\,__
,,_..........}.>-._\...................................|..............`=~-,
.....`=~-,_\_......`\,.................................\
...................`=~-,,.\,...............................\
................................`:,,...........................`\..............__
.....................................`=-,...................,%`>--==``
........................................_\..........._,-%.......`\
...................................,<`.._|_,-&``................`\
posted by loquacious at 11:42 AM on February 22, 2009 [9 favorites]


How could I have known that this thread would be nothing but image noise?!!??! And me one of the primary advocates for reinstating the image tag. Cruel irony.
posted by Chuckles at 11:47 AM on February 22, 2009


                                        
#####   ##   ##### ###### #####   ####  
  #    #  #    #   #      #    # #      
  #   #    #   #   #####  #    #  ####  
  #   ######   #   #      #####       # 
  #   #    #   #   #      #   #  #    # 
  #   #    #   #   ###### #    #  ####
posted by KokuRyu at 11:55 AM on February 22, 2009 [2 favorites]


Except I didn't. All those linked comments looked fine when I posted them.

"Broken" doesn't mean "obligated to not work". It just means "probably won't work, but could it some cases". It's like speeding. You're breaking the law, but nothing will probably happen...just don't be surprised when somewhere down the line you get a ticket.
posted by niles at 12:19 PM on February 22, 2009


When mathowie said "You just wrote broken HTML" he was talking to Dunwitty and addressing the HTML parsing issue.

Yeah, I agree that it's unfortunate that some older comments where people took our formatting quirks into account before posting are now messed up. But the vast majority of people used <pre> intuitively and found their comment broken. Now those are fixed. So we're trading off here and moving forward with a better system that works for most comments past and present.

it is the same as it always was in Recent Activity

All of these ascii art comments look fine for me in Recent Activity. If you let me know which comments aren't formatted correctly in RA I'll take a look and make sure that the current formatting is working there too.
posted by pb (staff) at 12:35 PM on February 22, 2009


:)
posted by iamkimiam at 12:40 PM on February 22, 2009


All of these ascii art comments look fine for me in Recent Activity.

Ya, true.. Here is the comment that isn't displaying correctly. Is it "self comments" that process differently?!
Probably is:
     .                .
    \ | /   ______   \ | /
    -( )__ /      \ __( )-
      \\__|        |__//
       `--(.------,)--'
          \ \_-._/ /
           `--)\\-'
              `-'
posted by Chuckles at 12:49 PM on February 22, 2009


Nope, that one looks right. How confusing..

Similarly confusing is why so many of the old uses of pre are still working, yet many others aren't. I always (well, when I got it 'right') stuffed the entire thing on one line with <br> tags where I wanted line breaks. those br tags are being stripped now, possibly for no good reason. It seems like there were other techniques being used..
posted by Chuckles at 12:54 PM on February 22, 2009


KokoRyu u r doin it wrong .


 _____ _ _____ ___ ___  ___ 
|_   _/_\_   _| __| _ \/ __|
  | |/ _ \| | | _||   /\__ \
  |_/_/ \_\_| |___|_|_\|___/

posted by The Whelk at 1:00 PM on February 22, 2009


damn, that should be blinking. Alas.
posted by The Whelk at 1:00 PM on February 22, 2009


If you're wondering what Dunwitty's talking about, you get:
A sentence with text. <<em>Text.</em>>
If you want to see <fake tag>, use &lt;fake tag&gt;
If you're wondering, yes, writing this comment properly is meta fun on multiple levels.
posted by Pronoiac at 1:39 PM on February 22, 2009


\o/
_|_
Stick figure doing the splits? Or crude martini with olive? You decide!
posted by Rhaomi at 1:41 PM on February 22, 2009


I looked at Chuckles' comments, compared 'em with the Wayback Machine versions, & I think his putting br tags after /pre causes the problem.
posted by Pronoiac at 1:51 PM on February 22, 2009


Ok, spoke too soon. Noodling around to see what happens.
posted by Pronoiac at 1:57 PM on February 22, 2009


 _____ _ _____ ___ ___  ___ 
|_   _/_\_   _| __| _ \/ __|
  | |/ _ \| | | _||   /\__ \
  |_/_/ \_\_| |___|_|_\|___/
Blink inside pre works. Outside, doesn't work. Weird..
posted by Chuckles at 2:01 PM on February 22, 2009


It looks like manually entered br tags are getting eaten. After preview, they're still in the comment edit box, but not in the previewed comment.
posted by Pronoiac at 2:17 PM on February 22, 2009


Aha! Where my old comments work it is <blockquote><pre></pre></blockquote>. When it is just <pre></pre> the <br> tags get stripped. This is starting to look like a real bug :)

Great idea about the Wayback Machine Pronoiac! Too bad so many pages aren't actually archived though..
posted by Chuckles at 2:19 PM on February 22, 2009


Testing:
my (%chr);                                                                                                                                                                                                                                                                                
print "--> parsing $rootBed for chromosomes\n";                                                                                                                                                                                                                                           
open (ROOTBED, "<>
foreach $coord () {                                                                                                                                                                                                                                                              
    chomp ($coord);                                                                                                                                                                                                                                                                       
    my ($chrN,$fields) = split("\t",$coord);                                                                                                                                                                                                                                              
    if (! defined $chr{$chrN}) {                                                                                                                                                                                                                                                          
        $chr{$chrN} = "true";                                                                                                                                                                                                                                                             
    }                                                                                                                                                                                                                                                                                     
}                                                                                                                                                                                                                                                                                         
close (ROOTBED); 
posted by Blazecock Pileon at 2:28 PM on February 22, 2009


Nope.
posted by Blazecock Pileon at 2:29 PM on February 22, 2009


Test 2:
my (%chr);                                                                                                                                                                                                                                                                                
print "--> parsing $rootBed for chromosomes\n";                                                                                                                                                                                                                                           
open (ROOTBED, "< $rootBed") or die $?;                                                                                                                                                                                                                                                   
foreach $coord (<ROOTBED>) {                                                                                                                                                                                                                                                              
    chomp ($coord);                                                                                                                                                                                                                                                                       
    my ($chrN,$fields) = split("\t",$coord);                                                                                                                                                                                                                                              
    if (! defined $chr{$chrN}) {                                                                                                                                                                                                                                                          
        $chr{$chrN} = "true";                                                                                                                                                                                                                                                             
    }                                                                                                                                                                                                                                                                                     
}                                                                                                                                                                                                                                                                                         
close (ROOTBED);  
posted by Blazecock Pileon at 2:29 PM on February 22, 2009 [1 favorite]


This is much improved. Is there a way to replace < and > with their equivalent entities, if contained within a <pre> block?
posted by Blazecock Pileon at 2:31 PM on February 22, 2009


 ___          _   _    _                         _   _               _     
| _ ) __ _ __| | (_)__| |___ __ _     _ __  __ _| |_| |_  _____ __ _(_)___ 
| _ \/ _` / _` | | / _` / -_) _` |_  | '  \/ _` |  _| ' \/ _ \ V  V / / -_)
|___/\__,_\__,_| |_\__,_\___\__,_( ) |_|_|_\__,_|\__|_||_\___/\_/\_/|_\___|
                                 |/
posted by deborah at 2:33 PM on February 22, 2009 [2 favorites]


Okay, another test.
Year              place        1     2     3     4     52006    X    OP    AK    CS    CE2005   LA     X     X     X     X2004   LA    AK     X     X    JA2003   LA     X     X     X    HZ2002   LA     X     X    SB?    X2001   LA     X     X     X     X2000   LA     X     X     X     X1999   LA     X    FE     X     X
Nothing special there..

Here is where the real magic is supposed to happen:
Year              place        1     2     3     4     52006    X    OP    AK    CS    CE2005   LA     X     X     X     X2004   LA    AK     X     X    JA2003   LA     X     X     X    HZ2002   LA     X     X    SB?    X2001   LA     X     X     X     X2000   LA     X     X     X     X1999   LA     X    FE     X     X
posted by Chuckles at 2:46 PM on February 22, 2009


No magic.. And I'm all confused because I was sure I found an archive copy of this, but it obviously isn't there. Oh well..
posted by Chuckles at 2:59 PM on February 22, 2009


will one of you smart ppl please put a red ASCII smiley face up by the metafilter logo?
posted by sergeant sandwich at 3:40 PM on February 22, 2009 [1 favorite]


* g o a t s e x * g o a t s e x * g o a t s e x *
g g
o / \ \ / \ o
a| | \ | | a
t| `. | | : t
s` | | \| | s
e \ | / / \\\ --__ \\ : e
x \ \/ _--~~ ~--__| \ | x
* \ \_-~ ~-_\ | *
g \_ \ _.--------.______\| | g
o \ \______// _ ___ _ (_(__> \ | o
a \ . C ___) ______ (_(____> | / a
t /\ | C ____)/ \ (_____> |_/ t
s / /\| C_____) | (___> / \ s
e | ( _C_____)\______/ // _/ / \ e
x | \ |__ \\_________// (__/ | x
* | \ \____) `---- --' | *
g | \_ ___\ /_ _/ | g
o | / | | \ | o
a | | / \ \ | a
t | / / | | \ |t
s | / / \__/\___/ | |s
e | / | | | |e
x | | | | | |x
* g o a t s e x * g o a t s e x * g o a t s e x *
posted by Damn That Television at 4:09 PM on February 22, 2009


Is there a way to replace < and > with their equivalent entities, if contained within a <pre> block?

Sure, make sure you replace < and > with &lt; and &gt; whenever you post a <pre> block that contains those characters. It's a frequent request and I'm not sure why folks think that should be automatic. That doesn't happen anywhere on the Web inside of a <pre> block so I don't think we should make that happen here.
posted by pb (staff) at 4:13 PM on February 22, 2009


   __  ______  _______  __/ /_  _______________(_) /_  ___ 
  / / / / __ \/ ___/ / / / __ \/ ___/ ___/ ___/ / __ \/ _ \
 / /_/ / / / (__  ) /_/ / /_/ (__  ) /__/ /  / / /_/ /  __/
 \__,_/_/ /_/____/\__,_/_.___/____/\___/_/  /_/_.___/\___/ 
                                                           
posted by jessamyn (staff) at 5:06 PM on February 22, 2009 [1 favorite]


                         \
                          \
                           \\
                            \\
             ░░░▒▒▒▒▒░       >\/7
           ░░░▒▒▒▓▓▓▓▓▓  _.-(0'  \
        ░░░░▒▒▒▓▓▓▓▓   ▓(=___._/` \
      ░░░░▒▒▒▒▓▓▓▓           )  \ |
    ░░░░░▒▒▒▒▓▓▓▓           /   / |
  ░░░░░░▒▒▒▒▒▓▓▓▓▓         /    > /
it's a unicorn throwing up a rainbow
posted by hellojed at 5:20 PM on February 22, 2009 [2 favorites]


WHUT WHUT

===~==~=================================================+==+?IIIII777777777III777777777777777777777777777777777777777777
==~=====~====================================+=============+?IIIII777777777777777777777777777777777777777777777777777777
~========~====================================~==+==++====++??IIII77777I777777777777777777777777777777777777777777777777
~~==================================~~~==~~~~~:~~~~~~==+=+++++++?????????IIII7777777777777777777777777777777777777777777
==~=================================~~:,,,,,:,,,,,::,,::~~~==+===+++++++?????I777777777777777777777777777777777777777777
=================================~~:,,,,,,,,,,,,,,,,,,:,::::~~~~~~~~~~~~===++???II77777777777777777777777777777777777777
============================~~,,,,,,,...,......,,,,,,,,,,::::::~~~~~~:~~~~~===+++??I777777777777777777777777777777777777
=========================~:,,......,,,.,,,,....,,,,.,,.,,,:::::::::::::::~~~~======+?I7777777777777777777777777777777777
=======================~:,.................,..,.,,,,,,,,,,,,,,:::::::::::~~~~~~====++?I7II777777777777777777777777777777
=====================~,,,..................,.,..,,,,.,,,,,,,,:::::::::::~:~~~~~~~~===++???I77777777777777777777777777777
=====~=============~::,.....................,,,,,.,,,.,,,,,,,,,,::::::::::::::~~~~~=====+++??I77777777777777777777777777
=================~~:,,,,......................,.,..,,,,.,,,,,,,,:::::::::::::::::~~~~~=====++?I??I7777777777777777777777
=================~,,,...........................,.,,,,,,,,,:::::::::::~::::::::::::::~~~~~======++?I77777777777777777777
================~::,,........................,,,,,,,,::::::~~~~~~~===~==~~~~~:::::::::::~:~~~~~~==+?77777777777777777777
===============~~::,.......................,,,::::::::~~~~~=~================~:::::::::::::~:~~~~=?I77777777777777777777
===============~~:,....................,,,:::~~~~~~~===========++++=++++++++==~~::::::::::::~~~~~==+I7777777777777777777
================~,,..................,,,::~~~~~~============+++++++++++++++++=~~::::::::::::::~::~==?7777777777777777777
===============~::.................,,,::~~~~~=~===========++++++++++++++???++==~::::::,:::::::::~:~=+?777777777777777777
===============~~:::............,,::::~~~~~~~==============++++++++++??????++==~:::::::::::::::::~~~~=?I7777777777777777
===============~~:~,...........,,:::~~~~~~~~==============++++++++++++??????+==~~::::::::::::::::~~:~=+I7777777777777777
================~~::,.,......,,::~~~~~~~~~~===============+++++++++++??????++==~~::::::::,::::::::::~~=?I777777777777777
==================:~,.......,::~~~~~~~~~~~~===============+++++++++????????++==~~:::::::,:,::::::::~:~=+?777777777777777
===================~:,.....,:~~~~~~~~~~~~~~====~=========++++++++++?????????++=~~:::::,:,,::::::::::::~=?777777777777777
====================~:,,...:~~~~~~~~~~~~~~~~~~~~===========+++++++++????????++==~::::::::,,:~::,::::::~~+I7??IIII7777777
=====================::,..:~~~~~~~~~~~~~~~~~~~~~~==========++++++++?+???????++==~::::::,::,::::::::::::~=?77777III??????
=====================~~:,,:~~~~~~~~~~~~~~~~~~~~~==========+++++++++++????????++=~~:::::::::,,,::::,::::~~+77 77777777777
=======================~:,~~~~~~~~~~~~~~~~~~~~=~============++++++++????IIII??+=~~~~:::::,,,:,:::::::::~~+77777777777777
=======================~::~~~~~~~~~~~~~~~~~~~~~==============+++++++????IIIII??+=~~~:::::::::,,,:::::::~~+77777777777777
========================::~~~~~~~~~~~~~~~~~~~~~=================++++??????IIIII??+=~~::::::,:::::::::::~=+77777777777777
========================~~~~~~~~~~~~~~~~~~~~~~===~~~~=~~~==~======++++?????IIIII?++=~~:~::::,::::::::::~~+I77 7777777777
========================~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:::::::~~~~==+??????II??++=~:::::::::::::::::~~=?7777777777777
=========================~~~~~~~~~~~~~~~~~~~~~~~~~::::::,,,,,,,,,,~:::~~==+?????????+=~::::::::::::::::~~=?7777777777777
=========================~~~~~~~~~~~~~~~~~~~~~:::,,,,.....,,,,::::::...,=I,::::::~~==~~::::::::~~::::::~~+I7777777777777
=========================~~~~~~~:~::::~~~~~~~~::::,,,,,,,,::::::~~~=:~=+++==========~~::::,:,::::::::~=+??I7777777777777
=========================~~~:::::::::::~~~~:~:::,,:~~:::::,,.,,,::~~~=++??+++++????+++~:::,,,:::,,::~=?II777777777777777
=========================~::::,,,,,,,,:::::~:,.:~~~~~::,,...,,,..,,:~=~=+?????????????+~~:::::~~~===+?I??+?7777777777777
=========================:,....,,....,........+===~::,,,,,,,,:,...:=~:,:~=????????????+=~~:::~~=+++???II?+++I77777777777
======================~,.,,,,.....,,::,.,:~::,+~~=~::,,.,,,::~,,.,:~~=+====++??????????+==~~~~=++???++?I?+++?I7777777777
==================~,.:~~.,.,,,,,...,,,,.~~===::~::~~:,,.,,::::::::~~=++++=++++++???II????++=~=+?????==+???+++?7777777777
=================,.,===~~,,:,,,.......,.~=====:=::~~:::::::::::::~~==++==+++++++???II?I????+++????I??++???+++?7777777777
=================,....,:~~::,....,....,~~==++++=+===~~:::::::~~~~~==========++++??IIIIIIIII????IIII=???????+??7777777777
==================+=====~~::,.,,.....,:~==+++++++++====~~~:::~~~~~==========+++???III?IIIII?????I?I~~=++++??+I7777777777
===========================~,,,::,,:::~~=++++??+?+?+++====~~~~~~~~=======+++++???????I?III?????????=~~===+?I?I7777777777
============================~:,,,,::::~==+++?????????++=======~~~======+++++++???II?????II??????I???~====+?I?I7777777777
============================~::::::::~~==++?+?????????++===============++++++????I??????II??????II??==+==+?I?I7777777777
============================~::::::::~===++++???????+++==============+=+++++???????????II?????IIII?I+=++++I+?77777777777
============================~::~:::~~~===++++???????+==~~===============++++????????????????I?IIIII+==+++???I77777777777
============================~~~~~~:~~~~==++++???????+=~~~~========+===++++++????????????????IIIIIII==+?II??I777777777777
============================~~~~~~~~~~~====++???????+=~:~~~~=========+++++++????I??????????????III?++?III?I7777777777777
============================~~~:~~~~~~~~===++????????+~::~~~~========++++++?????????????????I?IIIII+??????I7777777777777
============+=======+===+===~~~~~~~~~~~~~==+++++++++?+=::~~~~~=======+++++??????????????????I?IIIII??????I77777777777777
===================+=+===++==~:~~~~~:~~~~==+++~::~==++=::~~~~~~~=====+++++++????????????????II?III?I????I777777777777777
==========================++=~~~~~~~~:::~~====~~:,,:~~:~~~~~~~~======+++++????????????????????III?+?I??II777777777777777
======+===================++=~~~~~~~~:~::~~+++===~~~~~~==~~~~~~=======+++++++++??????????????IIII?++??I77777777777777777
===================+++====+++=~~~~~~~~~::::~~~~::~~~========~~~========++++++++???????????????III7I???777777777777777777
==================++++=+==+=++~~~~~~~~~::::,,,,:~~====================+=++++++++?????????II??III7777+?777777777777777777
============+===========++===+=~~~~~~~~~:::,:,::~~====================++++++++++?????????????III777I=I777777777777777777
=====+=============+++++=+=+++==~~~~~~~~:::,::::~~============++++=====++++=++++?????????????III777I+7777777777777777777
===============+++=++==+=+=+++++=~~~~~~~:::::::::~~~~~~~~======++++++=+++++++++???????????????II777I?7777777777777777777
===+======+=+++=++=+=+==++==+++++~~~~~~~:::::::::~~~~~~~~=======++++++++++++++++??????777(MeTa mathowie is watching you)

posted by numinous at 6:47 PM on February 22, 2009 [3 favorites]


Sorry BP, here's a less snarky version: sharing code in an environment that uses code for formatting is difficult. Many coding languages use angle brackets and the environment we're sharing code in does as well. The <pre> tag isn't an ideal solution, but it's currently the best formatting option we have for sharing code. But because we use <pre> for more than just sharing code, we can't alter its behavior here for the sole purpose of sharing code. That means we have to allow formatting such as bolding and italics within a <pre> block. And that means we can't automatically convert brackets to HTML entities.

Many people are frustrated with our current options for sharing code here, and it would be great if we could make that easier. But changing <pre> isn't the best solution in my mind. I'm not sure what would be better beyond a special way to mark various types of code so the expected syntax is known—a la pastebin.
posted by pb (staff) at 7:00 PM on February 22, 2009


 ____  _____  _____    ____  __  __  _  _ 
(_  _)(  _  )(  _  )  ( ___)(  )(  )( \( )
  )(   )(_)(  )(_)(    )__)  )(__)(  )  ( 
 (__) (_____)(_____)  (__)  (______)(_)\_)

posted by IndigoRain at 7:14 PM on February 22, 2009


That doesn't happen anywhere on the Web inside of a <pre> block so I don't think we should make that happen here.

No problem. Thanks for the straightforward response.
posted by Blazecock Pileon at 8:05 PM on February 22, 2009


 ⑨   ⑨    ⑨
  ⑨   ⑨  ⑨   ⑨   ⑨
     ⑨   ⑨    ⑨   ⑨
⑨    ⑨.i\ /i,  ⑨   ⑨
   ⑨  < '´  ̄ ヽ   ⑨
     __彡ノメノノlノリ〉 
⑨ ⑨ \ `ソリ!゚ ヮ゚ノi ⑨ ⑨
     ⑨ ><>つ ⑨
   ⑨  / ,く//_|l〉   ⑨
⑨     ⑨ ̄ l.ノl.ノ  ⑨   ⑨
   ⑨  ⑨  ⑨  ⑨  ⑨
⑨    ⑨   ⑨   ⑨   ⑨
    ⑨     ⑨    ⑨
posted by Marisa Stole the Precious Thing at 8:17 PM on February 22, 2009


quu..__                                                               
 $$$b  `---.__                                                        
  "$$b        `--.                          ___.---uuudP              
   `$$b           `.__.------.__     __.---'      $$$$"              .
     "$b          -' _          `-.-'            $$$"              .'|
       ".           | |                         d$"             _.'  |
         `.   /     | |                      ..."             .'     |
           `./      | |___               ..::-'            _.'       |
            /       |_____|           .:::-'            .-'         .'
           :                          ::''\          _.'            | 
          .' .-.             .-.           `.      .'               | 
          : /'$$|           .@"$\           `.   .'              _.-' 
         .'|$u$$|          |$$,$$|           |  <>
         | `:$$:'          :$$$$$:           `.  `.       .-'         
         :                  `"--'             |    `-.     \          
        :##.       ==             .###.       `.      `.    `\        
        |##:                      :###:        |        >     >       
        |#'     `..'`..'          `###'        x:      /     /        
         \                                   xXX|     /    ./         
          \                                xXXX'|    /   ./           
          /`-.                                  `.  /   /             
         :    `-  ...........,                   | /  .'              
         |         ``:::::::'       .            |<>
         |             ```          |           x| \ `.:``.           
         |                         .'    /'   xXX|  `:`M`M':.         
         |    |                    ;    /:' xXXX'|  -'MMMMM:'         
         `.  .'                   :    /:'       |-'MMMM.-'           
          |  |                   .'   /'        .'MMM.-'              
          `'`'                   :  ,'          |MMM<>
            |                     `'            |tbap\                
             \                                  :MM.-'                
              \                 |              .''                    
               \.               `.            /                       
                /     .:::::::.. :           /                        
               |     .:::::::::::`.         /                         
               |   .:::------------\       /                          
              /   .''               >::'  /                           
              `',:                 :    .'                            
                                   `:.:'

posted by Marisa Stole the Precious Thing at 8:32 PM on February 22, 2009


                                     .:::::::::.
                                  .:::::::::::::::.
                                 :::::::::::::::::::
                                :::::::::::::::::::::
                             :  `:::::::::::::::::::::
                            :: .. `:::::::::::::::'''  .::
                            :: `{:.,..````````...   .::''
                            `:::..``{{TATERS}}''..:::''.
                   .,c$$h.    `'::::::.....:::''''.,c$$L
                  J$$$$$.?. ,d$=  `````.,   .zcc$$$$$$$$.
                ,$$$$$$$F."4P".:`:: ,$$".:::. "$$$$$$$$$h   ,cc,
               ,$$$$$P".,P." '',c `,d$$ `'``':.`$$$$$$$$$h ="3$$c.
              .$$$$$F $$" dc -?""? ?$$',c$$c  ` ?$$$$$$$$F, d$$$$h.
              J$$$$$$ $F ,$',""$$h.?$',,,,."" . `$$$$$$$$ d 3$$$$$$.
              3$$$$$P $F $$    ?$$'J',$" `$$c  $$$$$$$$$P $h "$$$$$$
               ?C'.,c$P $$$    J$$ J $F   $$$h $$$$$$$$$' $$$ $$$$$$h
                `??""  ,$$$ h,c$$F.$ $h, ,$$$',$$$$$$$$$c,`$P.$$$$$$$
                      ,$$$$c`??"",c, "$$$$$P',$$$$$$$$$$$h ?L'$$$$$$P
                      $$$$$$$F zd$$$h  """',d$$$$$$$$$$$$$h`?.`??$$P'
                     J$$$$P",c$$$$$$$h."$$$$$$$$$$$$$$$$$$$h. `??"'
     ,cd$$$$$$$$$$h J$$$$",J$$$$$$$$$$$c ?$$$$$$$$$$$$$$$$$$$
   ,$$???????$$$$$F.$$$$$ $$$$$$$$$$$$$$h`$$$$$$$$$$$$$$$$$$$h
  J$P"        `""" J$$$$$c`$$$$$$$$$$$$$F,$$$$$$$$$$$$$$$$$P"'
 d$"               J$??".  `??$$$$?????" $$$$$$$$$$$$$$$$$$ J$$$$$hcc,.
J$$                J" ,','  ;    , ,. . . `"?$$$$$$$$$$$$$$ $$$$$$$$$$$$c,
3$$                J ' } .{! ;! ;!;'!} - `!.  "?$$$$$$$$$$$.'$P??""""""?$$h
`$P",nmn        .   c ' ;!! ;!! !!! '!} !; {!.`;`$$$???$$$$$c,           ?$$
 ? uMMP ,nmnmdMMM'  3$c, `  ''' {!!''!!} !} `' ,c$$F nx.?$$$$$            $$
  dMM",dMMMMMMP"'   `$$$h.`  ,____,=  `. ' ,ccc$$$$h MMMx."??"           z$$
  MP nMMMMMMMM,      ?$$$$.`\ """"" ,-' .d$$$$$$$$$$c )MMMMMn.  ..     ,c$$P
  " =MMMMMMMMMMMbm,   ?$$$$h.``````',c$$$$$$$$?????"",dMMMMMMMb;MMr .z$$$P"
     "MMMMMMMMMMMMP'   ?$$$$$$$$$$$$$$$$$$$$$ nmMMMMMMMMMMMMMMP{MMM ?$$P"
      `MMMMMMM          "$$$$$$$$$$$$$$$$$$$$."4MMMMMMMMMMMMMMb`MMM.`"
       MM4MMMMx           "??$$$$$$$$$$$$$$$$$ccc= ,MMMMMMMMMMM "MM
       4Mr "4MMr               ""?????????????"",nmMMMMMMMMMMMMP  "
       `M    `"                $|c             4MMMPPP4MMMMMMP
                               $|$              "      MMMM"
                               $|$              ;!;   dMMP'
                           ,,, "|"              ;' {! P" ;{!
                      . . .  ...  -          `" , ;,,. -'!!!.
                     ''' '.;;;;;.         ,!' ." `-._``--..`'
                    ;;;;;..```..;;;{}   ''- ...;;;.   `~- ' ;;
                  .`''!!!!!!!!''''`.;; ;;;;;;..````''-;' ,;!!'
                  ''{;;......;;;;-'`   `'!!!!!!!!!!-- ,;!!'`
                       ```````        !!;,,.````.,,;{!!'`
                                       ```''''''''''``
posted by Fiasco da Gama at 9:10 PM on February 22, 2009 [4 favorites]


  
  ______                         ___
 /    ___  \                      /  _  \
|    /   )__)                    |  ( )__)
|   |             _____   _____  |  |   ______  _____  __      _____
|   |     _____  /  _  \ |  _  \ |  |__(_    _)|   __)|  |    |     \
|   |    (_   _)|  (_)  || (_) / |   __) |  |  |  (__ |  |    |  |\  |
|    \____/  |  |       ||    <  |  |    |  |  |   __)|  |    |  | ) |
|            |  |   _   ||     \ |  |   _|  |_ |  (__ |  |___ |  |/  |
 \__________/   |__( )__||__(\__\|__|  (______)|_____)|______)|_____/
   _____  __  __  ____
  |_   _|| (_) | |  __)
    | |  |  _  | |  __)
    |_|  |_( )_| |____)                     _   _
  ________         ________              ``/_\"/_\''
 /        \       (__    __)             /-(o).(o)-\
|     __   |  _____  |  |                \-\_/-\_/-/____,
|    |  )__) /  _  \ |  |                 \-      =  =  =\
|    |   __ |  (_)  ||  |                 /-             -\,
|    |__)  )|       ||  |                (=   |      /-    -\__
|          ||   _   ||  |                 \, _/-    _\-   __|_-\
 \________/ |__( )__||__|                (__(__/___(____/(_____/

posted by KokuRyu at 9:20 PM on February 22, 2009


                   .m.                                           
            8888mmm..                                            
           db8Pd88888b                                           
          d88b8888888,b   WHAT KIND OF                  
         d888PY888888=8    SEXUAL POSITION IS THIS?               
        d8888b|8~ ~Y88P                                          
       dPd8888d8 ^| "'                                           
      dP=8888PY8._'| |                                           
     dP=d8/ ~ \P',--.|            ,'                             
    dP=d8:   ` ` \   |    ,     ,' ,\                            
   dP=d8||  __\ \/---' _,' \  ,' ,:::\                           
  d88d88; \' `|  \    / ~|\ \' ,::::::\                          
 d888888'  \  \__/__.~   / > \,::::::::\    ___                  
 888888|    \       .'~~~ <>
 888888|     `.__.-~       `~ \ `::::md888"~~~~~"888m            
 888888|      `._            ,'`.`::d88P'       , `Y88m          
 Y88888|         /--......  //   ..d88P       ``|\||/)8b         
  Y8888|      ,-'         ,;'  , ,  "P          \._ /Y88.        
   Y888| |\_.'\          //   , , \  \           |_|  888        
    "Y88\~     \...--- ,;'/  , ,  88m   ___ .~   | |  888        
         \      `    |//_/  , ,   8888 `-._ |    |_|  888mmmP"   
          `.     \  .;'~'  , ,    `888       `-' | |,d88'##P mm~ 
            \     `//  '    ,      `88.          | `888'd###P'   
             `     `. L_._',        `88b.        |  .P'#####b.m" 
            ''`     | __//,          `Y88bm.__.md|  | 'Y######P  
            '' `    | \ ,,             `-8888888"|  | _d#####P~  
      _.mmmm'~m.|   |\ ;--.               /       ,  ;d#####'    
    ,m88888,,d88|_|\| '    \             /-~     |  , ~ P'Y#     
   m88"~   ''  "88\  `  /\  .          /\_,-,   /~~~       Y     
  d8P     , '    Y8\  : \/  |        .(_(/ /~~-..__              
 d8P      '.    ,-' \  . ..,'      _'    `'        ~-.    JESUS  
m88       '' ,-'     \ ` `        -                   `\   CHRIST
888       ,-'       _ ` ` .`    ,'      `._    / ,      |        
888           __.-'~888.  --.__,       /'-_~~~~/      /         
888     |_.-~~      888|   .~,;    ,-'~    )  /       /  I CAN'T 
"88                 88'`~~~,;;\   '    _  /|  >    _-'  BREATHE  
 88b               d8P  \,:;'  \__..-~~ `^ |  \___/              
  888m           ,d8P                    (_|  /(/\_              
   "888m.______,m88P                    <>             
     "88888888888"~                                              
        ~~""""~~

posted by Marisa Stole the Precious Thing at 9:54 PM on February 22, 2009


                   .m.                                           
            8888mmm..                                            
           db8Pd88888b                                           
          d88b8888888,b   WHAT KIND OF                  
         d888PY888888=8    SEXUAL POSITION IS THIS?               
        d8888b|8~ ~Y88P                                          
       dPd8888d8 ^| "'                                           
      dP=8888PY8._'| |                                           
     dP=d8/ ~ \P',--.|            ,'                             
    dP=d8:   ` ` \   |    ,     ,' ,\                            
   dP=d8||  __\ \/---' _,' \  ,' ,:::\                           
  d88d88; \' `|  \    / ~|\ \' ,::::::\                          
 d888888'  \  \__/__.~   / > \,::::::::\    ___                  
 888888|    \       .'~~~ <>
 888888|     `.__.-~       `~ \ `::::md888"~~~~~"888m            
 888888|      `._            ,'`.`::d88P'       , `Y88m          
 Y88888|         /--......  //   ..d88P       ``|\||/)8b         
  Y8888|      ,-'         ,;'  , ,  "P          \._ /Y88.        
   Y888| |\_.'\          //   , , \  \           |_|  888        
    "Y88\~     \...--- ,;'/  , ,  88m   ___ .~   | |  888        
         \      `    |//_/  , ,   8888 `-._ |    |_|  888mmmP"   
          `.     \  .;'~'  , ,    `888       `-' | |,d88'##P mm~ 
            \     `//  '    ,      `88.          | `888'd###P'   
             `     `. L_._',        `88b.        |  .P'#####b.m" 
            ''`     | __//,          `Y88bm.__.md|  | 'Y######P  
            '' `    | \ ,,             `-8888888"|  | _d#####P~  
      _.mmmm'~m.|   |\ ;--.               /       ,  ;d#####'    
    ,m88888,,d88|_|\| '    \             /-~     |  , ~ P'Y#     
   m88"~   ''  "88\  `  /\  .          /\_,-,   /~~~       Y     
  d8P     , '    Y8\  : \/  |        .(_(/ /~~-..__              
 d8P      '.    ,-' \  . ..,'      _'    `'        ~-.    JESUS  
m88       '' ,-'     \ ` `        -                   `\   CHRIST
888       ,-'       _ ` ` .`    ,'      `._    / ,      |        
888           __.-'~888.  --.__,       /'-_~~~~/      /         
888     |_.-~~      888|   .~,;    ,-'~    )  /       /  I CAN'T 
"88                 88'`~~~,;;\   '    _  /|  >    _-'  BREATHE  
 88b               d8P  \,:;'  \__..-~~ `^ |  \___/              
  888m           ,d8P                    (_|  /(/\_              
   "888m.______,m88P                    <>             
     "88888888888"~                                              
        ~~""""~~
Take it to AskMe.
posted by Deathalicious at 10:07 PM on February 22, 2009 [2 favorites]


Getting all sorts of Jrun errors around this time these past couple of days - is it sleepy time for the server?
posted by Abiezer at 11:56 PM on February 22, 2009


        _....._
      .'   ^   '.
     /    wtf    \
     |`'--...--'`|
      \   ooo   /
       '._____.'
         / | \
        /.-|-.\
       /'._|_.'\
      /    |    \
           |
posted by Blazecock Pileon at 12:47 AM on February 23, 2009 [1 favorite]


I'm not sure you'll see this in all the ASCII art, but, pb: I think the handling of the PRE tag is right, since it's for preformatted text. But HTML also has a CODE tag. You could add the additional logic there for program blocks. Escaping all other HTML within a CODE block would make sense, as you don't generally need boldface or italics on your for loop. That'd be handy for AskMe; being able to directly cut and paste from code examples would be a neat feature.

Probably a giant PITA, too, but figured I'd mention it. :)
posted by Malor at 10:23 AM on February 23, 2009


I don't think previous use of the PRE tag is worth the effort, since it was used mostly for ASCII jokes

But they were my ascii jokes, and beloved by the whole community!


This one is still broken
           #########
        ################
      ######  ####  ######
     #######  ####  #######
     ######################
     ######################     
     #######        #######
      #####  ######  #####
        ################
           ##########
posted by chrisamiller at 10:42 AM on February 23, 2009


Yeah, using <code> for this would work too, but I really don't like the idea of changing how HTML formatting works for a specific purpose like this. I'm leaning more and more toward running our own copy of Pastebin here, or creating a completely new, non-HTML way of formatting code. (A BBS-style [code]...[/code] tag?) But each of those has its own drawbacks too, and sharing code happens in a small percentage of answers. It'd be like setting up a special way to share recipes with nice, indexed ingredients lists. We can share code and recipes with the system we have, and is it worth the complications to improve sharing any one type of content over another?
posted by pb (staff) at 10:45 AM on February 23, 2009


This one is still broken

I think I fixed it. That was a one-time-only deal, though.
posted by cortex (staff) at 11:06 AM on February 23, 2009 [1 favorite]


Yeah, using <code> for this would work too, but I really don't like the idea of changing how HTML formatting works for a specific purpose like this.

How about a checkmark underneath the comment box that flips between encode/don't-encode before posting?
posted by Blazecock Pileon at 11:53 AM on February 23, 2009


True, we could add a switch. Just to extend my example, we could have a checkbox that says, "this is a recipe" underneath every comment box too. Because most comments aren't sharing code, should we add a permanent switch to the interface for that particular activity?
posted by pb (staff) at 11:58 AM on February 23, 2009 [1 favorite]


Yeah, that's the core thing that this kind of comes back to: sharing code on metafilter is an outlier thing, not something we're worried about for the vast majority of comments. It's not that it never comes up, it's that it comes up so infrequently compared to the normal commenting activity on the site that the return we'd get on complicating the interface with another widget is really minimal.

Even a net drag, at that, for the huge chunk of the commenting userbase who will never, ever even want to use the feature, and the extra work that will come with trying to explain what it's there for to them, educate them on when and why to use it, field complaints from folks who don't get it, etc.

It's not that we don't care, it's just not something that seems worth the trouble when looking at site activity in aggregate.
posted by cortex (staff) at 12:10 PM on February 23, 2009


Because most comments aren't sharing code, should we add a permanent switch to the interface for that particular activity?

Not for everyone, perhaps, but for those who enable said feature in their profile. Just as is done with MeFi Mail and other opt-in features.
posted by Blazecock Pileon at 1:15 PM on February 23, 2009


As with any special feature you want on MetaFilter that most people won't want, need or use, the answer is invariable a GreaseMonkey script.

With that in mind, I present MetaFilter Comment Box - code tags, which automatically escapes < and > tags when you are inside of <code> tags.

It appears to play nice with automatic preview, and it happens as you type.
posted by Deathalicious at 3:04 PM on February 23, 2009 [1 favorite]


Okay, during debugging I found a tiny error (shouldn't affect most people, but just in case, if you've already downloaded it, it's probably a good idea to download it again).
posted by Deathalicious at 3:28 PM on February 23, 2009


True, we could add a switch. Just to extend my example, we could have a checkbox that says, "this is a recipe" underneath every comment box too.

Tags should behave as one expects based on "standard" html. Pre has been fixed now, which is great. My comment history makes me look a little inept and a lot of existing answers aren't nearly as useful as they were -- I take those things seriously -- but it is a small price for a properly functioning and very useful tag.

So, the question is, does code behave the way it is supposed to? I can't really tell. I goofed around with a couple of HTML files, and it looks like Firefox and Explorer both interpret tags found within code tags. That seems completely wrong, but I guess if it is a browser/html standards problem, there isn't much point in MeFi trying to fix it.
posted by Chuckles at 6:12 PM on February 23, 2009


Understood that you don't want to screw with this now, but should it come up again in future, another thought would be a custom, MeFi-only tag. Something like <DWISNWIM> -- Do What I Say, Not What I Mean.

You'd probably want something a bit shorter, though. :)
posted by Malor at 5:45 AM on February 24, 2009


Metafilter: ))<>((
posted by Sys Rq at 9:50 AM on February 24, 2009


That seems completely wrong, but I guess if it is a browser/html standards problem, there isn't much point in MeFi trying to fix it.

Why? Because it does not behave the way you want it to behave? The <code> tag is a phrase element, meant to signify a fragment of computer code, that is all.

Semantically it is different in purpose than the <em> tag, but from a processing standpoint it is exactly the same. Emphasized text is normally in italics, code is normally presented in fixed-width font. But these are merely stylistic choices. The key is that these tags are used to indicate that certain sections of text should be considered informationally distinctive. There is no, and should be no, expectation that choosing any phrase element would alter the way that the browser parsed content interior to those tags.

So I am hoping you mean "browser/html standards problem" in the sense that humans not being able to fly is an "aerodynamics problem". Because the browsers are behaving correctly and the standards are also correct here.

That being said, there were two tags, <xmp> and <listing> that were specifically purposed to display their content without parsing. Since this did not conform to SGML specs, it was dropped from the HTML standard. Today, you can theoretically do the same thing using CDATA, but the easiest and best thing to do is to use entities, &lt; and &gt;.
posted by Deathalicious at 11:15 AM on February 24, 2009


« Older Repony Filter: Can we flag or ...  |  The mainstream love for the gr... Newer »

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