2

I.e. I just edited Ninject Dynamically Loading a Repository from an Assembly and noticed that there is no syntax highlighting/coloring.

Update: After adding the C# tag to the question, syntax highlighting now works.

2
  • Yet another good reason to add a language tag to questions... Commented Aug 8, 2011 at 9:57
  • @Cody Gray: not really, since the question is not about the C# language itself. It just happens that the OP used C# (but he could have used VB.NET and hit the exact same problem). Commented Aug 8, 2011 at 9:59

1 Answer 1

8

Code is highlighted depending on the tags associated with it.

Since that question doesn't feature a specific "language" tag or one that allows the interpreted to guess the the fall back is unhighlighted code.

You could add a language specific tag to the question, or have a look at Interface options for specifying language prettify for details on how to make specific code blocks be highlighted with a specific language colouring. The basic rule is:

<!-- language: (language identifier) --> code 
4
  • Indeed, adding the C# tag solved it! Commented Aug 8, 2011 at 9:43
  • 2
    see meta.stackexchange.com/questions/72082/… Commented Aug 8, 2011 at 9:46
  • Ah ha, that's a much better reference, thanks @Jeff. Favourited for future reference. Commented Aug 8, 2011 at 9:48
  • Why isn't the HTML comment working? It says it works even if there is no specific tag present, but it doesn't Commented Dec 22, 2013 at 11:37

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.