•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the DaniWeb Community Feedback section within the Coffee House category of DaniWeb, a massive community of 397,610 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,556 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our DaniWeb Community Feedback advertiser:
Views: 1123 | Replies: 14
![]() |
If I leave the language out of the code, then I can use colour just fine, like so
But if I add a language, say 'c', then it all goes pear shaped and the colour tags are no longer parsed.
printf("%d. file has been created\r",i);
fflush(stdout);But if I add a language, say 'c', then it all goes pear shaped and the colour tags are no longer parsed.
c Syntax (Toggle Plain Text)
printf("%d. file has been created[color="Red"]\r[/color]",i); fflush(stdout);
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,881
Reputation:
Rep Power: 32
Solved Threads: 108
That's the intended behaviour. When using language-specific tags, snippets are already color-coded. If you want to point out something specific, refer to it by line. If you absolutely have to point something out via color, use non language specific tags.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,881
Reputation:
Rep Power: 32
Solved Threads: 108
Bold and italic tags are already being used with the language-specific tags for specific keywords. For example, in the line the word "printf" is actually in bold in contrast to the rest of the line. However, bold font is hard to distinguish in Courier New (or any fixed width font, for that matter). In fact, when I was very anti-color, and before we had syntax-specific code tags, the reason I conceded to allowing color was because people pointed out that bold and italic tags were not doing a good enough job pointing out specific lines in code.
c Syntax (Toggle Plain Text)
printf("%d. file has been created\r",i);
Last edited by cscgal : Nov 7th, 2007 at 1:27 pm.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
Wouldn't it be better if your parser at least removed the color tags from syntax-highlighted code? Some people aren't aware that color tags don't work in syntax-highlighted code tags (or they paste it from their editor, which for some reason has the code all colored), and then all we see is a bunch of BBCode crap.
tuxation.com - Linux articles, tutorials, and discussions
•
•
•
•
Wouldn't it be better if your parser at least removed the color tags from syntax-highlighted code? Some people aren't aware that color tags don't work in syntax-highlighted code tags (or they paste it from their editor, which for some reason has the code all colored), and then all we see is a bunch of BBCode crap.
Nyah. If they want to screw up their code and post without a PREVIEW, let them. We just don't have to read it since they didn't care enough to verify their post.
Age is unimportant -- except in cheese
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,881
Reputation:
Rep Power: 32
Solved Threads: 108
What if someone wants to type code that uses the [param=value] format? If someone types [x=y] in their code it should be stripped?
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
•
•
What if someone wants to type code that uses the [param=value] format? If someone types [x=y] in their code it should be stripped?
Well, you would only strip [color=xxx], [b], [i], etc. And considering that it would be parsed anyway if they had just used a normal [code] tag, what difference does it make?
tuxation.com - Linux articles, tutorials, and discussions
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,881
Reputation:
Rep Power: 32
Solved Threads: 108
Because this way people have a method for when they NEED to use such things in their code. If both code methods stripped them, they'd be SOL to display any code in bbcode format.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb DaniWeb Community Feedback Marketplace
•
•
•
•
afghanistan backup badge biometrics blair blog blogger blogging blogs breach building bush code colour community competition computer dani daniweb database development events highlighting iraq itv jargon jbennet language mail member networks news photo php politics qmail search second server smtp social social networking survey syntax tags terrorist virtual web yahoo!
- file handeling (C)
- Stuff has stopped working. (DaniWeb Community Feedback)
- Why color should be disabled ... (DaniWeb Community Feedback)
- code tags (DaniWeb Community Feedback)
- serial communication programming in C language (C)
- HTML & XML (HTML and CSS)
- [C][/C] Tags (DaniWeb Community Feedback)
- Checking source codes of image, audio and video files (Site Layout and Usability)
- Microsoft .NET FAQ (ASP.NET)
- Macromedia Coldfusion 5 Language Reference (ColdFusion)
Other Threads in the DaniWeb Community Feedback Forum
- Previous Thread: Moderator Positions
- Next Thread: Style Changes Today



Linear Mode