diyAudio

diyAudio (http://www.diyaudio.com/forums/)
-   Forum Problems (http://www.diyaudio.com/forums/forum-problems/)
-   -   Problem witht [code]blah[/code] ? (http://www.diyaudio.com/forums/forum-problems/127618-problem-witht-code-blah-code.html)

elseif 5th August 2008 08:30 PM

Problem witht [code]blah[/code] ?
 
I would like to post an ascii image (op amp circuit). I attempt to use *code* stuff */code* ("*" = "[" and "]") to preserve the spacing and an extra line feed gets inserted after each line of text, thusly:
Code:

      .------o--|___|---.   
      |      |          |   
      |      |  |\|    |   
      C|      --|-\    |   
      C|        |  >----o-->
      C|    .--|+/         
      |      |  |/|         
    ===    ===             
    GND    GND

Any suggestions?

lineup 17th August 2008 12:30 AM

Re: Problem witht [code]blah[/code] ?
 
Quote:

Originally posted by elseif
I would like to post an ascii image (op amp circuit). I attempt to use *code* stuff */code* ("*" = "[" and "]") to preserve the spacing and an extra line feed gets inserted after each line of text, thusly:
Code:

      .------o--|___|---.   
      |      |          |   
      |      |  |\|    |   
      C|      --|-\    |   
      C|        |  >----o-->
      C|    .--|+/         
      |      |  |/|         
    ===    ===             
    GND    GND

Any suggestions?


This is a fault of the software for this forum. ( http://www.vBulletin.com )
More precisely the php script used to handle your post.

The tag [ code] means that everything inside should be preserved just as entered, character for character.

Now Windows add 2 different chars for ONE linebreak:
\r\n
while Unix based systems adds only
\n
where \r = return and \n = newline

Both these corresponds to one HTML <br>

Now, somehow the script that handles posted stuff within the [ code ] tag
adds not only one <br>, but two <br><br> for each newline.

This could be easily fixed in a php script, that deals with Windows vs. Unix different ways
to announce one new line in post forms.

Probably, hopefully, vBulletin has fixed this, in later versions.
I would have a guess www.diyaudio.com uses some really old version.
Which by data age measurements is >= 5 years back dated version .. or even more.


Regards Lineup


All times are GMT. The time now is 06:57 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio


Content Relevant URLs by vBSEO 3.3.2