I want to highlight the code in comment box, How can do this. I want to highlight my syntax code highlight in comment field
111971
What special formatting tricks can be done in the comments now?  Proven:   **text** or __text__ = Bolding = text *text* or _text_ = Italics = text `text` = Code Formatting = text [example](http://example.com "title") Inline links with title and text http://example.com plain old links   Disproven:   Cannot insert &lt;kbd&gt; (i.e. F12) characters Cannot use #[text] to increase size
51249
A quick question. We used to have a code coverage highlighted in dev console on which lines of the class are covered and not covered before.   Has salesforce removed this option or do i need to activate it somewhere?
82402
Notes:  Answers will occasionally be moved to the  when there are too many of them. When using them to report bugs, keep an eye on the post.    This site, Meta Stack Exchange, is usually used as a &quot;test bed&quot; for pending changes happening to the way text is rendered on all network sites. Changes to text rendering that are going to be rolled out to the network are usually deployed here first to test them out and fix any potential glitches. Currently, there are no such changes pending, but if there were, keep in mind that text posted here may render differently from the other sites until the changes roll out to them as well.    As per Jeff's suggestion in : You can use this question as a formatting sandbox. You can:  edit  itself ( questions such as this one require only 100 reputation to edit instead of 2,000) post answers to this question (This question might be , requiring earning 10 reputation on this site to answer) post comments to this question or its answers test suspected bugs with the editor or the rendering post ponies (only when mods are asleep)   Beware that since the  in December 2010, and  added in March 2011, no syntax highlighting is applied unless the question's tags or an inline hint enable it. So, to test highlighting here in the sandbox:  , you can use GitHub-flavor fenced code blocks in your posts, specifying the language after the opening fence: ```html While not hinted otherwise: &lt;html&gt;&lt;/html&gt; source &lt;b&gt;goes&lt;/b&gt; &quot;here&quot;. ```  ```js var a = 3; while (not (a &gt; 0)) {     alert(&quot;JavaScript code &lt;b&gt;goes&lt;/b&gt; here.&quot;); } ```   Or:  Create code blocks in any way (using the fence notation above, the four-space indent form, or using HTML &lt;pre&gt;&lt;code&gt; tags).  Save your post.  Use your browser's developer tools to edit the resulting HTML. To open developer tools, press F12, or ⌥⌘ I on Mac.  Find the &lt;pre&gt; element and add the attribute class=&quot;prettyprint&quot;, or change it into one of the valid syntax hints linked above, like class=&quot;lang-vb prettyprint&quot;.  Run the following in the location bar: javascript:prettyPrint(); or prettyPrint() in the console.     Answers that are considered annoying or obnoxious, or that cause breakage for users, will be deleted. This is .
99333
All the code boxes are appearing as 1 line to me. This:  #include &lt;stdio.h&gt;  int main() {     printf("Hello, world!\n");     return 0; }   Appears thus:  #include &lt;stdio.h&gt;  int main() {     printf("Hello, world!\n");     return 0; }   ...which is making the longer code posts harder to read. Someone posted a binary search tree, which was just impossible to read like that.  It appears correct in the preview as I write this.  Firefox 3.6.3, Gentoo Linux 2.6.32  Edit: To clarify: The correct version (with newlines) appears briefly on both Stack Overflow and Meta, but as soon as syntax highlighting is applied (which is almost instantly), then it collapses to 1 line.  This applies to the editor in the "edit question" part, but it seems to be a bit lazier about applying syntax highlighting. (It seems to do it when the box you type in loses focus, so as I'm typing this, it appears correctly, with no syntax highlighting, and when I un-focus the text area, a few moments later, it syntax highlights and collapses to 1 line.)
38266
I just approved several edits from a user adding  to questions with the  tag. Apparently , Google Code Prettify has added support for Dart.  I suggest it's time to follow suit and update the default syntax highlighting associated with the  tag. Adding it manually to every question sounds like way too much work, even if I all I have to do is click the "Approve" button.
9385
Hello  I would like to see changes in the comment section. Presently, we cannot start a new line. Everything gets posted in one line. Even the code looks horrible.   Also, to color the code in comments.
112700
When you edit the body of a post, the "How to Format" widget is shown in the right sidebar. It mentions the syntax highlighting function, even on  like :    It's probably also a good idea to move the part about code fences down for non-technical sites (like ); other formatting options are more important there.
42956
Do you think it would be worthwhile to provide hints as to what language to use for the syntax highlighting?  Sometimes I find the highlighting on SQL or VB.NET answers is more distracting than helpful; for example:       to pick the two I've been looking at recently.
25740
In a Lightning Component, I have the following markup which I have to comment in and out for testing purpose  &lt;force:inputField value="{!v.account.Name}" class="form-control uiInput--input input" /&gt;   now when I try to comment it out like this  &lt;!--&lt;force:inputField value="{!v.account.Name}" class="form-control uiInput--input input" /&gt;--&gt;   the API tells me     markup://c:elfL1:6,81: ParseError at [row,col]:[7,81] Message: The   string "--" is not permitted within comments.   Since I didn't figure out that fancy class name uiInput--input (Salesforce did so...) it would be nice to be able to toggle that om/off OR avoid to use class names like this...
10517
To &quot;comment out&quot; a line, I need to insert a % at the beginning of the line (so that the line will not be compiled). Is there a way to comment out a large section without having to manually place % in front of each line?
92186
I'm trying to typeset some python code, and I would like integer literals to be highlighted. I've come up, after about two hours of fighting with the documentation and various other questions here and on SO, with the following:  \lstset{ %     language=Python,     otherkeywords={1, 2, 3, 4, 5, 6, 7, 8, 9, 0},     morekeywords=[2]{1, 2, 3, 4, 5, 6, 7, 8, 9, 0},     keywordstyle=[2]{\color{orange}},     keywordstyle=\color{blue}\bfseries,     stringstyle=\color{red}, }   Unfortunately, that doesn't work. Numbers found in strings are also highlighted, which is rather annoying, and not only are they highlighted: they are highlighted in blue. Numerals in regular program text, on the other hand, are rightly highlighted in red.  Help?  EDIT: Thanks Peter Grill for your very nice solution. Is there a way to not break string colouring, though? When I use you code, the stringstyle=\color{red} doesn't seem to work anymore (strings are just plain black). Similarly, comments can be enclosed in triple quotes in python, and if I adapt your quote to detect """ blocks, then the corresponding  comments are not highlighted anymore.
25314
In  I tried to add  for syntax formatting to code blocks quoted from the question. However, it seems they won't be honoured if I write them as a comment in my own part of the post, and if I include the hint in the qutotation as well then I have some ugly empty space before the code block. There should be a way to write these things properly.
72015
If you are looking at an answer with a code snippet in it, and the answerer updates the answer, you see An edit has been made (etc.). If you click that, the answer is refreshed, but the code snippet buttons (Run, Copy, and Expand) go missing.  The code snippet buttons are there again after reloading the entire page.  Answer has been edited:        After clicking to reload it:        Similarly, non-snippet code blocks do not receive syntax highlighting after an edit, as described , which refers to  as a related or root cause.  (Browser: Chrome v77 - OS: Windows 10 Pro x64)
33316
Does anyone know a way to display code in Microsoft Word documents that preserves coloring and formatting? Preferably, the method would also be unobtrusive and easy to update.  I have tried to include code as regular text which looks awful and gets in the way when editing regular text.  I have also tried inserting objects, a WordPad document and Text Box, into the document then putting the code inside those objects.  The code looks much better and is easier to avoid while editing the rest of the text.  However, these objects can only span one page which makes editing a nightmare when several pages of code need to be added.  Lastly, I know that there are much better editors/formats that have no problem handling this but I am stuck working with MS word.
48251
I am unable to see what I type in the Gedit editor using dark theme.  This is due to the default setting of highlighting the current line.
120170
I use texmaker and some time ago I found, by chance, a way to comment many lines at once, but I can't remember it now. Can somebody remind me of that?
56302
I don't think I'm going any more crazy than normal, but I'm surprised I can't see any other meta mention so far. This started happening recently on at least SO and ubuntu.SE, and occurs in at least IE and Firefox. So I'm guessing it's a deliberate feature not [bug]. But I'm not keen.  It's not standard in any browser for a &lt;textarea&gt; to submit when Enter is pressed; the behaviour to me seems spooky and undesirable. I've already accidentally-commented more than once and had to delete the comment and drag the text back into editing.  (I realise you can't actually have a newline in a comment, but I've often used newlines to separate thoughts I'm editing together into a comment, or maybe bits to overflow into a subsequent comment. I don't really want to have to break out the text editor to get this ability.)  May I have my Enter key back please Sir?