For questions about and issues with the way Stack Exchange sites use the "prettify" library for syntax highlighting.

learn more… | top users | synonyms

8
votes
1answer
128 views

Manual specification of code block with <!— language: python --> fails [duplicate]

According to the editing help: You can use either one of the supported prettify language codes, like lang-cpp or lang-sql, or you can specify a tag, and the syntax highlighting language associated ...
1
vote
2answers
100 views

Error in C# Syntax Highlighting

I've noticed a glitch in the syntax highlighting of C# codes in SO. The c# tag's standard highlighting doesn't include the keywords using and namespace However when adding the language directive ...
2
votes
0answers
50 views

Still not-fixed bug: literal string [duplicate]

to bring this to the front, as it clearly got lost or was reintroduced to google-code-prettify Still Literal Strings will highlight the rest of the code as String, see this screenshot: in the ...
6
votes
0answers
114 views

Can we prettify makefile code? [duplicate]

I was wondering if there is a makefile prettify language tag that I can add to highlight variables, flags or whatever prettify is able to identify. As mentioned in the comment by Frederic, I'm ...
3
votes
0answers
64 views

Support Rust language syntax highlighting on Stack Overflow [duplicate]

Support proper syntax highlighting for code sections containing Rust code.
16
votes
1answer
357 views

There's a bug in the syntax highlighting

There's a bug in the syntax highlighting for the foo tag: It's not highlighting the bar keyword correctly... or, there's some escaping problem that means that everything's being rendered as a ...
1
vote
1answer
58 views

Syntax highlighting for XPath

I just answered a question on SO and was wondering about the syntax highlighting. As you can see at Xpath - get maximum attribute for each element the syntax highlighting for XPath goes wrong, ...
23
votes
0answers
197 views

Add default syntax highlighting for the [dart] tag

I just approved several edits from a user adding explicit syntax highlighting to questions with the dart tag. Apparently since this was last discussed, Google Code Prettify has added support for Dart. ...
10
votes
0answers
197 views

there needs to be a lang-powershell option for prettify on SO [duplicate]

Close Voters, please read my comment below before casting your vote. I believe SO is maintaining their own version now, so forking the original and adding posh support would NOT solve this feature ...
1
vote
0answers
40 views

CSS syntax highlighting isn't right with # symbol [duplicate]

Possible Duplicate: What’s happening to syntax highlighting for [css] questions? The problematic question is Conflict with CSS Files lines starting with # symbol are completely gray - and ...
3
votes
0answers
33 views

Define Ruby as the default syntax highlighting scheme for Rspec

I stumbled into this question which contains a block of Ruby code with test specs. It seems as if the syntax highlighting does not work. Here is a screenshot in case it looks different on your ...
1
vote
0answers
65 views

Add syntax highlighting for posts with the [greasemonkey], [userscripts], or [content-script] tags

Greasemonkey scripts,  userscripts (as tagged on Stack Overflow), and content-scripts all run, and are implemented in, javascript. Yet questions tagged with greasemonkey, userscripts, or ...
-2
votes
1answer
161 views

Can we please have code formatting tools?

Ahhh! My eyes! Seriously, looking at some posts like this one and this (see revision history) can make you go blind. Can we please have some sort of a code formatting tool like JSLint or something? ...
13
votes
1answer
101 views

Add syntax highlighting for posts with the [go] tag

Posts with the go tag currently do not have syntax highlighting applied. When I manually set a code block's language with <!-- language: lang-go -->, the syntax highlighting works as expected. ...
3
votes
1answer
120 views

Java's keyword “interface” not highlighted properly [closed]

The interface keyword is not being highlighted. Even though the code block is recognized to be Java, the interface keyword is marked up by Prettify to be a plaintext. public interface YUNoHighlightMe ...
2
votes
1answer
196 views

What is the better highlighting language for http Apache conf

I'm looking for the best way to highlight Apache HTTP configuration : Here an example with lang-java : Here an example with lang-xml, which really not satisfy me: <VirtualHost *:80> ...
10
votes
1answer
154 views

“sql-server” type tags not defaulting to SQL-lang for the code editor (prettify)

I know how to override the language chosen, and I believe that the chosen language is driven by the tags. I'm not asking for So if a question is tagged C#, and I want to post a SQL Server stored ...
2
votes
0answers
62 views

Could you add syntax highlight of Cucumber scenarios?

Gherkin isn't in list of supported prettify languages and is highlighted incorrectly when using <!-- language: lang-default--> (words that don't have special meaning in Gherkin are highlighted). ...
5
votes
1answer
194 views

Unable to force Python syntax-highlighting

I have asked a question related to web2py—an open-source Python web-framework—that includes a code snippet. Unfortunately it didn't syntax highlight by default, so—following the docs—I added the ...
2
votes
1answer
109 views

Hash (#) Character Causing Unwanted Code Grey-out

During my short tenure under the CSS tag, I've noticed that code-prettify seems to interpet a naked # character as the beginning of a comment, for example: #footer a.footA { color: #6bc2ef; } ...
27
votes
1answer
588 views

What's happening to syntax highlighting for [css] questions?

I just noticed that the prettify language hint for questions tagged css has been changed to lang-default; it was lang-css before. While this allows HTML code blocks to be highlighted as HTML, ...
4
votes
2answers
92 views

Syntax Highlighting Doesn't Recognize Line Continuations Within VB6 Comments [duplicate]

I've run into some unexpected syntax highlighting mistakes while I was asking a question about VB6. When I use _ after using ' to add comments about my code I see that _ does not work within ', but ...
7
votes
1answer
121 views

What happened to the syntax highlighting here on meta?

I can understand there not being any highlighting by default, but it's difficult to demonstrate problems with the highlighting here (besides this one, obviously) when you can't even do it by specific ...
13
votes
1answer
177 views

Syntax highlighting for C doesn't properly recognize `restrict` as a keyword [duplicate]

And while we're at it, C11 adds some keywords like _Atomic as well. Is this the right way to submit requests for addition, or would it be better to ask for it in the 'Google Code Prettify' project? ...
6
votes
1answer
93 views

Can [sencha-touch]-tagged posts be associated with lang-js for Prettify purposes?

sencha-touch (along with almost all of the Sencha tags) will all have their code examples written in javascript. Since the language type for prettify is inferred from the tags, I'm suggesting that ...
1
vote
1answer
91 views

XML highlighting of tag with < in the attribute

I'm still searching for an exising bug report on the google prettify bug list page and I will add one if none exist, but I thought someone here might like to know as well. It seems that XML attributes ...
3
votes
1answer
342 views

HTML markup blocks don't highlight as HTML in [css] questions automatically

Code blocks predominantly containing HTML are always highlighted as CSS the moment a question bears the css tag, regardless of whether or not the html tag is present. I always need to force HTML ...
10
votes
1answer
125 views

Syntax highlighting language hints being overridden after loading

I just want to report something that appears to be a bug. Adding language hints to code blocks has been working great so far. If we give it a hint, it will give us the right highlighting right? Well, ...
3
votes
0answers
73 views

How to control syntax prettify in a quote block?

I recently answered a question quoting heavily from an RFC. Since the RFCs only look tolerable with code formatting, I tried to mark it up with both code indenting and quoting. But the RFC rendered ...
0
votes
1answer
124 views

Where can I find a documentation for the prettify code script stackoverflow uses? [duplicate]

Possible Duplicate: StackOverflow's code color-coding script. Available? The formated code tag seems to be rendered with a JavaScript library called prettify. Is this something Open ...
15
votes
3answers
335 views

Can c# comments be green and not light gray?

I'm pretty sure just about everybody in the universe who codes c# has configured their code comments to be green. In fact, I don't know any language where people tend to color their comments in ...
0
votes
0answers
35 views

lang-vb has a problem with space [duplicate]

Possible Duplicate: Code that is too long to display on a single line creates a massive vertical code block I'm starting to think that the lang-vb prettify option has a problem. I just ...
10
votes
1answer
259 views

Include explicit Google Prettify instructions in the markdown help

If I understand it correctly, SO is supporting Google Prettify. There is no information about this within the Markdown editing notes (the Code section of the toolbar and in the advanced help). I ...
5
votes
2answers
285 views

Prettify hates sql, or How do I get Prettify to Properly Handle SQL?

None of these appear to be working... Edit to see the ways and means it fails. language: lang-sql, no indent on Prettify comment Select * from Foo where Foo.bar == "baz" language: sql, no ...
20
votes
1answer
326 views

Implement (e.g.) <!— language: lang-css --> in preview

Okay, so we've got Interface options for specifying language prettify implemented now, which is fantastic! There's a little bitty problem, though: As it stands, this doesn't work right in previews. ...
2
votes
1answer
133 views

Is <!— language: lang-blah --> deployed and supposed to work on SE sites such as Programmers?

I've tried it, but it has no effect on Programmers.SE, even though it seems to work here on meta. I see it's been only about 6 weeks since this feature was implemented — does it usually take ...
2
votes
1answer
113 views

Formatting bug causing code to not show up [duplicate]

Possible Duplicate: Unbalanced blank lines after inline HTML comments might break formatting In this post: Formatting Sandbox the preview shows code (stuff indented 4 spaces), while the ...
5
votes
1answer
276 views

Cannot apply same language hint in multiple code blocks

Now that syntax highlighting hints have now been implemented, I've been going through the answers I can remember that did not have syntax highlighting (due to the tags) and add the hints. However, I ...
6
votes
2answers
450 views

Please add a “prettyprint” class when explicitly defined class with <!— language: something -->

Please add a "prettyprint" CSS class when explicitly defining class with <!-- language: something --> regardless of there being no valid language tag. It is inspired by question Syntax ...
2
votes
1answer
181 views

Manual Prettify does not work for “js” but “javascript” works

Manual Prettify does not work for "js" but "javascript" works <!-- language: js --> got rendered as language "default", but <!-- language: javascript --> properly rendered as ...
18
votes
1answer
655 views

Syntax highlighting: what about answering with a different language than the one used in the question?

Sometimes, it can be useful to quote a different language to the one used in the question. For example, one might be interested in the C source code of a language interpreter in order to understand ...
4
votes
1answer
93 views

Inconsistent highlighting of HTML block

This question has this block of HTML: <h4 class="toggle">Title1</h4> <h4 class="toggle">Title2</h4> <h4 class="toggle">Title3</h4> <div ...
58
votes
23answers
9k views

Changes to syntax highlighting

locked for the history - please post bugs and feature-requests separately. -Shog9 We're changing the way syntax highlighting is done on the Stack Exchange engine. As you probably know, we ...
0
votes
0answers
42 views

Comment bug in syntax highlighting? [duplicate]

In a recent SO question, the following code appeared: # define v putchar # define print(x) main(){v(4+v(v(52)-4));return 0;}/* #>+++++++4+[>++++++<-]> ++++.----.++++.*/ ...
120
votes
1answer
13k views

Interface options for specifying language prettify

I'm the maintainer for Google Code Prettify. Markup authors can specify the language for source code, but not markdown authors. Are the SO admins interested in a way of doing this? If so, might the ...
1
vote
0answers
127 views

Is it possible to explicitly tell Stack Overflow the language of the code block you are including? [duplicate]

Possible Duplicates: stackoverflow syntax highlighting Syntax highlighting hints Stack Overflow awesomely detects what language a code block is and syntax highlights it accordingly. But ...
0
votes
1answer
147 views

How to highlight the code

I have been read Javascript code prettifier, but I still didn't understand how to use prettify here on Stack Exchange sites... I can't copy highlighted text and I can reference the prettyfy function ...
1
vote
0answers
160 views

Allow declaration of programming language for syntax highlighting [duplicate]

Possible Duplicate: Syntax highlighting hints The parser for code blocks has some kind of heuristic (the "Prettify" library, IIUC) for guessing what programming language syntax to use for ...
12
votes
3answers
328 views

Allow `class` attribute for `<code>` tag [duplicate]

Possible Duplicate: Syntax highlighting hints As we all know, prettify.js, which is used by Stackoverflow for syntax highlighting, allows the specification of the intended language. ...
-6
votes
2answers
308 views

Use the same colors as Visual Studio for prettify.css [closed]

I'm pretty sure stackoverflow already uses the same color as VS for everything except comments, which are displayed gray: /* Test */ I think it's much better to display them in green-ish (same ...

1 2