Johnny34Fed Up. Bye. Premium Member join:2001-06-27 Atlanta, GA
1 recommendation |
Johnny34
Premium Member
2005-Oct-16 3:13 pm
[request] Code TagsWhen using the "[ code ]" tags, could we have the formatted code block be about 20 characters wider? It isn't as wide as the "bquote" blocks and it's not obvious why not. Compare: if [ $publicIP != $savedIP ]; then defaults write com.jlsoftware.updateDSLR IP -string $publicIP curl -m 10 -u $userID:$dslrPW "http://www.dslreports.com/nic?action=edit&started=1&host_id *=$dslrHost&myip=$publicIP" fi
(*) WARNING 1 long line(s) split if [ $publicIP != $savedIP ]; then defaults write com.jlsoftware.updateDSLR IP -string $publicIP curl -m 10 -u $userID:$dslrPW "http://www.dslreports.com/nic?action=edit&started=1&host_id=$dslrHost&myip=$publicIP" fi
The code tags result in a split line, but the bquote tags don't. Pretty please?? |
|
justin..needs sleep Mod join:1999-05-28 2031 Billion BiPAC 7800N Apple AirPort Extreme (2011)
|
justin
Mod
2005-Oct-16 6:05 pm
Re: Code Tagsat least on my browser, the font for bquote and code is different. The font used for code is quite a bit larger.
If IE would fix their browser and allow horizontable scrolling blocks without using iframes (such as firefox etc does) the whole problem would go away. |
|
Johnny34Fed Up. Bye. Premium Member join:2001-06-27 Atlanta, GA |
Johnny34
Premium Member
2005-Oct-16 6:38 pm
said by justin:at least on my browser, the font for bquote and code is different. The font used for code is quite a bit larger. If IE would fix their browser and allow horizontable scrolling blocks without using iframes (such as firefox etc does) the whole problem would go away. I'll post the screenshot to show that the code font is actually much smaller than the bquote font on Safari.
|
|
justin..needs sleep Mod join:1999-05-28 2031 |
justin
Mod
2005-Oct-16 6:58 pm
yes, every browser has a different idea about the size of fixed width fonts, despite specifying them the same way this end. Unfortunately, with IE, and firefox and windows, the code tends to take up more space than the regular text. |
|
Netgear R6400 Switches Trash Bin Apple AirPort Extreme (2011)
|
to justin
said by justin:If IE would fix their browser and allow horizontable scrolling blocks without using iframes (such as firefox etc does) the whole problem would go away. So you're saying IE wouldn't support overflow: auto in the code div? Would it be possible to add in functionality for other browsers then? |
|
Johnny34Fed Up. Bye. Premium Member join:2001-06-27 Atlanta, GA |
to justin
I don't know HTML that well so I have to admit being still confused. I just noted that there are 3 inches of blue space on the right side of the formatted code block and yet it still split the line. It seems to split it at 91 characters. |
|
justin..needs sleep Mod join:1999-05-28 2031 Billion BiPAC 7800N Apple AirPort Extreme (2011)
|
to rjackson
Unfortunately not because, if you notice, the line breaking is done in the database, not upon display, which is probably too expensive. So as long as the "most popular" browser blows its margins then we are stuck with the lowest common denominator. |
|
Netgear R6400 Switches Trash Bin Apple AirPort Extreme (2011)
|
said by justin:Unfortunately not because, if you notice, the line breaking is done in the database, not upon display, which is probably too expensive. So as long as the "most popular" browser blows its margins then we are stuck with the lowest common denominator. Hey, this is something I've seen in Firefox but never in Safari before:
I like it. Are you still line breaking in the database too?
|
|
justin..needs sleep Mod join:1999-05-28 2031 Billion BiPAC 7800N Apple AirPort Extreme (2011)
|
justin
Mod
2005-Oct-18 1:48 pm
No. Msie starts to work (adds the scrollbar) if you fix the width in the css. Which is a shame as the width should be auto picked to stay within the surrounding table. But at least I don't have to snap lines anymore.
Also older browsers will lose now. |
|
|
Oh, neat...I like this better. |
|
Johnny34Fed Up. Bye. Premium Member join:2001-06-27 Atlanta, GA |
to justin
This is superb. Thanks Justin!
Copy and paste of code now is a breeze. |
|
|
to rjackson
there is a height issue with IE when the code is only one line. example: » Thank you! -- Topic mouseovers. |
|
justin..needs sleep Mod join:1999-05-28 2031 |
justin
Mod
2005-Oct-22 11:32 pm
yes, I couldn't find the fix, however. IE is buggy. |
|
|
PapaDosCum Grano Salis MVM join:2001-02-08 Drummondville, QC |
to Johnny34
Sorry to wake up an old thread !
Maybe adding a blank line or two automatically at the end would help ? |
|
1 edit |
MorWired
Premium Member
2006-Jan-7 1:10 pm
said by PapaDos: Sorry to wake up an old thread !
Maybe adding a blank line or two automatically at the end would help ?
Or some transparent character/code. When I posted a one-line code block yesterday I just added in a carriage return (broke up the line between codes), but an automatic insertion of something beginning or end should take care of the problem without being terribly unsightly or taking up much extra space. |
|
PapaDosCum Grano Salis MVM join:2001-02-08 Drummondville, QC |
to Johnny34
It seems adding only one line (CR/LF) at the end would work pretty well... |
|
Johnny34Fed Up. Bye. Premium Member join:2001-06-27 Atlanta, GA |
Johnny34
Premium Member
2006-Jan-9 9:00 am
said by PapaDos:It seems adding only one line (CR/LF) at the end would work pretty well... Then when someone copies and pastes the block into their shell, it will hit Return, which often is not what is wanted. The person copying and pasting may need to add text to the pasted line before executing the command, and having a CR/LF that was not part of the original text would defeat that purpose. Also I think CR/LF is a Windows-specific line ending. All hell would break loose with Mac or Unix users trying to figure out why their code was crapping out. |
|