TIGblogs TIG | TIGblogs GROUP TIGBLOGS LOGIN SIGNUP
Mark A. Chrisman's Blog
Mark A. Chrisman's Blog
Better Source Code Posting


For the coders among you, you may already know that posting source code is really easy here on WordPress.com thanks to the sourcecode shortcode. You just wrap your code in [sourcecode] and you’re good to go — no code escaping or anything.

If you are one of those code posters, or are looking to become one, then you’ll be happy to know that we’ve updated the feature allowing more flexibility as well as adding support for additional coding languages like Bash and SVN diff.

See for yourself — here’s some HTML with a little bit of PHP:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>WordPress.com Code Example</title> </head> <body> <h1>WordPress.com Code Example</h1> <p><?php echo 'Hello World!'; ?></p> <p>This line is highlighted.</p> <p>This line is very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long.</p> <divhttp://en.support.wordpress.com/code/posting-source-code/">in-depth support document.

This feature was implemented using Alex Gorbatchev’s SyntaxHighlighter package. It’s also available as a plugin for WordPress.org users.


December 2, 2009 | 3:12 AM Comments  0 comments

Tags:
You must be logged in to add tags.


Mark A. Chrisma's Profile


Latest Posts
The Growth of Mobile...
The Growth of Mobile...
Building a Community |...
DNS Editing Deployed
Share Photos with a...

Monthly Archive
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
July 2008
August 2008
September 2008
October 2008
November 2008
December 2008
January 2009
February 2009
March 2009
May 2009
June 2009
July 2009
August 2009
September 2009
October 2009
November 2009
December 2009
January 2010
February 2010
March 2010
April 2010
May 2010
January 2011

Change Language


Tags Archive
annualgathering art audio blogging collaborative communication cultureconvergence devlearn08 drums elearning elearningguild flash games hiphop instructionaldesign learning lms lunch2.0 m0serioustv microblogging mobile music photography science socialmedia socialnetworks video web web2.0 wiki

Filter By Type
Topics


19547 views
Important Disclaimer