Logged Out
Create an Account
Login:
Password:

Forgot your password?
BBCode [code] tag

BBCode [code] tag
[Back to Index]  [Bottom of Thread]
Thread Tags
Primary: [Tickets]
Secondary: None
BBCode [code] tag
Go To This Ticket's Page
Creator Nevir
Public or Private Public
Private tickets are only accessible to you and to DKPSystem.com staff
Public Tickets are visible to everyone)
Status Closed
Type Bug
Section of the Site Forum
Urgency (3 votes)
Rating (3 votes)
Description:
Can you modify the [code] bbcode tag to emit a <pre> tag as opposed to a styled div? Using the <pre> will automatically default to a monospaced font *and* it'll preserve whitespace, which the current tag does not do (not to mention make it easy & consistent to style!)
Official DKPSystem.com Comments
Done
Indeed. I also intend on utilizing a library posted a few months back for syntax highlighting in the code tags so keep your eyes peeled

--
It's all in the reflexes.
Ooh, that would be most sexy!

On that note, though, you should make sure that there's some way to simply do non-highlighted code (I notice that people tend to use [code] tags for quick 'n dirty formatting from time to time) Maybe just adding a [pre] as well, unless that syntax highlighter is really good at guessing languages or lack thereof
The syntax highlighter will have an optional parameter specifying the language. So the current code tags won't be affected, while new syntax highlighting will work like:

Here's some <?=$PHP?> code


--
It's all in the reflexes.
Quote by Chops
The syntax highlighter will have an optional parameter specifying the language. So the current code tags won't be affected, while new syntax highlighting will work like:

Here's some <?=$PHP?> code


Aha, good solution!
If you syntax library supports it, I know it would be nice to have these supported syntaxes:

- JavaScript
- HTML
- Lua

I know I've posted stuff with all three...

--
Quaiche - Addon Author, Druid, and Guild Leader for Benevolent Thuggery on Dragonblight
Completed!

--
It's all in the reflexes.


[Back to Index]  [Top of Thread]