John Kaster

Behind the Screen

EDN Tip #1: Posting source code snippets on our discussion forums

with 5 comments

EDN supports both NNTP/NNTPS and HTTP/HTTPS for our discussion forums. Some special html processing is performed by our forum software when posting code snippets, which can mess up indenting of code snippets. Robert Triest asked about preserving code formatting for his posts on our discussion forums, and I answered him in the same thread.

When posting source code snippets using our web forms, the formatting of the code is not preserved unless you wrap the source code with the {code} tag, on both sides of the code snippet, like so:

{code}
this is my source code
  with this line indented
  and this line indented
{code}

Robert’s test post after learning the special {code} shows how it works.

Whether you use news reader client (NNTP/NNTPS) or browser client to participate in our discussion forums, I recommend you wrap your code snippets with {code} so anyone else who reads your post can see well-formatted source code.

Enjoy!

John Kaster
EDN Program Manager
Embarcadero Technologies, Inc.

Advertisements

Written by John Kaster

May 27, 2010 at 10:25 am

Posted in EDN

5 Responses

Subscribe to comments with RSS.

  1. Wouldn’t it be nice to have that in the “Plain Text Help” box on the right when posting a message?

    Sebastian

    May 27, 2010 at 12:16 pm

  2. @Sebastian, good suggestion. Can you add that to QualityCentral? http://qc.embarcadero.com/wc/qcmain.aspx?da=24205

    Thanks!

    John Kaster

    May 27, 2010 at 12:58 pm

  3. Gotta agree with Sebastian. That’s definitely needed.

    Mason Wheeler

    May 27, 2010 at 1:42 pm

  4. Done.

    Report No: 84976 Status: Reported
    Add quick help for {code} tags to the “Plain Text Help” box
    http://qc.embarcadero.com/wc/qcmain.aspx?d=84976
    QCWIN:Defect_No=84976

    Sebastian

    May 28, 2010 at 9:08 am

  5. Sebastian, Mason: the quick help for {code} has been deployed. Thanks for the suggestion.

    John Kaster

    May 28, 2010 at 11:46 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: