What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

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).

share|improve this question
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! –  j_random_hacker Dec 21 '10 at 1:10
add comment

marked as duplicate by waiwai933, Jon Seigel, Jeff Atwood Dec 21 '10 at 3:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

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();

}
share|improve this answer
add comment

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