LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Projects > LinuxQuestions.org > Feature
User Name
Password

Notices


Additional languages for code syntax highlighting Issue Tools
issueid=120 01-11-2011 03:10 AM
Member
Additional languages for code syntax highlighting
e.g. for more common languages like C/C++, Python, etc.

I notice that pretty much the only language here that has a BBCode tag for syntax highlighting is PHP (with the [php][/php] tags). It would be nice if syntax highlighting for additional, more common languages could be added.

Er, by "more common", I mean that from what I've seen, PHP code isn't posted nearly as often as C/C++, shell scripts, Python/other non-shell interpreted languages, etc. Plus which I doubt many actually use the special tags even when they are posting actual PHP code (they'll just use the normal [code][/code] tags).

I'm thinking a way of doing this might be to include a "lang=" option in the tag, for example:

Quote:
[code lang=c]<C code to be highlighted here>[/code]
Just something to consider...maybe?
Issue Details
Issue Type Feature
Project LinuxQuestions.org
Category Forums
Status Suggested
Priority 4
Suggested Version Unknown
Implemented Version (none)
Votes for this feature 2
Votes against this feature 0
Assigned Users (none)
Tags (none)

01-11-2011 05:47 PM
Senior Member
 
Yes, it would definitely be a good thing. However, I think the 'lang' option is unnecessary; it just needs to be:

[code="some language"]

or the like, the same way quoted blocks of text are.
Reply
Reply

  



All times are GMT -5. The time now is 12:38 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration