Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

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 {
    void someMethod();

Examples from SO:


After a comment suggesting to test it out locally with Prettify, I did. The code used (+ latest downloadable Prettify):

<!DOCTYPE html>
<html lang="en">
        <meta charset="utf-8" />
        <link href="prettify.css" type="text/css" rel="stylesheet" />
        <script type="text/javascript" src="prettify.js"></script>
    <body onload="prettyPrint()">
        <pre class="prettyprint lang-java">public interface YUNoHighlightMe {
    void someMethod();

This confirms the Prettify bug as it does not highlight the keyword.

The interesting part is that if I omit the lang-java language hint, it works well and the word gets highlighted.

share|improve this question

closed as off topic by Manishearth, Adam Lear Jul 1 '12 at 9:12

Questions on Meta Stack Exchange are expected to relate to the software that powers the Stack Exchange network within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

throw new NamingConventionViolationException("yUNoHighlightMe"); – Daniel Fischer Jul 1 '12 at 4:41
You seem to realize that the syntax highlighting is handled by Prettify; why are you filing this here? File it against Prettify – Michael Mrozek Jul 1 '12 at 4:41
@MichaelMrozek Oh, right. I kinda thought SE was using it's own version or maybe some other inner mechanism was interfering with it. Those assumptions... I'll file it and post it here as an answer ASAP. – Slanec Jul 1 '12 at 4:46
@slanec you're right there, sometimes MarkDown does interfere with prettify and mathjax. In that case, first test it out in a pure prettify environment and then determine where the bug is to be filed. – Manishearth Jul 1 '12 at 8:00
@ManishEarthwantsmorewaffles Now that's what I wanted to hear. The local test confirmed the bug, details in the updated question. – Slanec Jul 1 '12 at 8:22
up vote 7 down vote accepted

The bug has been filed on the Prettify project:

EDIT (Feb 2013): Fixed at the Prettify side.

share|improve this answer
"The interesting part is that if I omit the "lang-java" language hint, it works well and the word gets highlighted." I guess this way Prettify authors try to communicate their belief that in Java, interfaces are designed the wrong way :) – gnat Jul 1 '12 at 14:22

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