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

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 with syntax highlighting / code prettyifier looked hilariously bad. So I tried to turn it off with the following two attempts, neither one worked. Both colored the RFC text.

<!-- language: lang-none --> hint on a line by itself:

<!-- language: lang-none -->

>     The absoluteURI form is REQUIRED when the request is being made to a
>     proxy. The proxy is requested to forward the request or service it

> <!-- language: lang-none --> hint, and the blank line required for the formatting hint to function (annoying, btw) represented with > as well:

> <!-- language: lang-none -->
> 
>     The absoluteURI form is REQUIRED when the request is being made to a
>     proxy. The proxy is requested to forward the request or service it

In a true comedic stroke, I can't reproduce the problem here, on [meta], and my edit was quick enough on my original answer that the problematic input there has been thrown away. (Which is overall a wonderful feature, thanks.)

What is the correct way to insert <!-- language: lang-foo --> tags into code-formatted quoted content?

share|improve this question
    
For quoting plain text in preformatted code I use the good ol' <pre></pre> tags. Just as they were meant to be used. Not that that would relate to your question of course :) –  BoltClock's a Unicorn Jun 13 '11 at 8:58
    
@Bolt, that probably would have worked just as well as the four-space code formatting I used in the end. I mean, the difference between quoted code and code is so slim that it is nearly pointless. (But the CSS might change in the future to have a larger distinction.) Or I might want a different language, not just lang-none. –  sarnold Jun 13 '11 at 9:06

1 Answer 1

Seems to work with the bigger hammer <!-- language-all: lang-foo -->:


void foo(int);
void foo(int);
void foo(int);
void foo(int);

<!-- language-all: lang-c -->

    void foo(int);

<!-- language-all: lang-none -->

>     void foo(int);

<!-- language-all: lang-c -->

>     void foo(int);

<!-- language-all: lang-none -->

    void foo(int);

void foo(char);  
void bar(long);

This workaround appears to work on Stack Overflow too (on that specific post).

Seriously not pretty here though.

share|improve this answer
    
I have tried to attempt it with this question. I try to apply lang:none with the quote at the bottom, but it only works if I remove the quotes. –  Jamal May 26 at 19:47
1  
It works with language-all:, not with language:. –  Mat May 26 at 19:48
    
I have applied that to the question, and it appears to work! –  Jamal May 26 at 19:51
    
Cool. The margin at the bottom of the quote block is a bit too thick IMO (compared to the margin on top), but I don't think that's fixable from markdown. –  Mat May 26 at 19:57
    
That's true, but I'm okay with that. –  Jamal May 26 at 19:57

You must log in to answer this question.

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