0

Possible Duplicate:
Allow highlighting certain bits of a code fragment or quote

In dealing with a wall of code, it would be handy to be able to paint some of it red, or bold, or something. Editing the question to highlight the part that actually matters can be an effective part of answering.

Since the syntax highlighter knows from comments, you could recognize:

//SO:YO

//SO:OY

as matching delimiters (using whatever comment syntax is active).

1
  • 2
    I agree, but it will be tough -- show me a syntax for highlighting a line in a text block, and I'll show you a Perl snippet that needs that syntax to be shown verbatim! Commented Dec 21, 2010 at 1:10

1 Answer 1

3

I agree generally; If I had to post a large block, but point out a smaller subset, I would probably surround the relevant lines with flowerbox code comments above and below, and point it out in the question text.

Trying to apply style like bold or italic does not seem to work, so that works OK instead, for me.

private void exampleMethod()
{
    NonImportantStuff();
    NonImportantStuff();
    NonImportantStuff();
    /*
    *  IMPORTANT STUFF BELOW.... 
    */
    ImportantStuff(arg1, arg2);
    /*
    *  IMPORTANT STUFF ABOVE
    */
    NonImportantStuff();
    NonImportantStuff();
    NonImportantStuff();

}

Not the answer you're looking for? Browse other questions tagged .