What is the tab width (number of spaces indented for a tab) within code tags? Is it 8? Is it possible to change it to 4? Since the code is wrapped for lines with length less than 80 characters, I think that it is a waste of space.
WolfPack
491
Posting Virtuoso
Team Colleague
Recommended Answers
Jump to PostThe question is one of indentation, not embedded tabs. You only have to worry about the consecutive tabs at the beginning of a line:
$post_data =~ s/\n(\t+)/' ' x (tab_stop * length($1))/e;
Where post_data is your string and tab_stop is the number of desired spaces to replace tabs with.
Jump to Post>As you can see, I don't have to go very far back to demonstrate how often things would be broken.
Nothing would be broken if what we have now remains the default, and only a special tag option changes the behavior. ;) Though since we have enough people posting code …
Jump to PostNothing would be broken if what we have now remains the default, and only a special tag option changes the behavior.
It would only be used by three people :) And I'm not sure of even that. You've said in the past you don't use (code=syntax), despite it's …
Jump to Post>You've said in the past you don't use I do now. Before it was because it didn't do what I wanted, but now it seems to work okay.[code=syntax]
I do now. Before it was because it didn't do what I wanted, but now it seems to work okay.
Jump to PostIMO going all the way to convert tabs into spaces using some intelligent algorithm is way too much trouble than it's worth. It is basically the responsibility of the programmer posting the code to make sure that all tabs are converted to spaces and to follow the 80 column width …
All 34 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Narue
5,707
Bad Cop
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
WolfPack
491
Posting Virtuoso
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
John A
1,896
Vampirical Lurker
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
John A
1,896
Vampirical Lurker
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
John A
1,896
Vampirical Lurker
Team Colleague
Narue
5,707
Bad Cop
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Narue
5,707
Bad Cop
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Narue
5,707
Bad Cop
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Narue
5,707
Bad Cop
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Narue
5,707
Bad Cop
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Narue
5,707
Bad Cop
Team Colleague
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Narue
5,707
Bad Cop
Team Colleague
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.