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

Possible Duplicate:
How do I format my code blocks?

This question has been asked and answered before. But some of the answers are outdated, and some don't work, and the only one that does, well, I'm hoping it's not the only option.

How can I post an entire html document into Code Review (an SE member site) without modifying the code before posting?

I want to post an entire html document into Code Review for reviewing. Here are the methods mentioned in other posts:

  • Use the '010 101' button. - This appears not to be available anymore.
  • Wrap in backticks. - This has unusual behaviour. Everything before the first <div> tag inside the <body> appears in the post as normal text, not as html code. Everything after that is rendered as I wish, as html code.
  • Wrap the code in an <html> block. - This has almost identical behaviour to the backticks.
  • Wrap in a <pre><code> block. - This works. But it requires that I first replace every < with &lt;. I will do that, but I just want to be sure I haven't missed an option that will let me paste without modifying.
share|improve this question

marked as duplicate by John Fitzpatrick, Arjan, hims056, Toon Krijthe, Martijn Pieters Dec 1 '12 at 13:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Do you have a question? Or an issue that needs addressing? This is just a nice story so far, but nothing actionable. –  Oded Dec 1 '12 at 11:39
    
Yes, I'll edit the post. –  John Fitzpatrick Dec 1 '12 at 11:40
    
What does entire document mean? It is discouraged to post long code segments. –  juergen d Dec 1 '12 at 11:43
    
It's actually for the Code Review site, where it is in some cases encouraged to post more rather than less. I'll edit the question. –  John Fitzpatrick Dec 1 '12 at 11:44
    
Anything that the FAQ How do I format my code blocks? does not explain? –  Arjan Dec 1 '12 at 11:45
    
That one didn't come up when I searched. I found a lot of posts, that gave me the four methods I mention in my question, but not the {} option. Voting to close as duplicate. (That should earn me some kind of obscure badge, voting to close own question.) –  John Fitzpatrick Dec 1 '12 at 11:51

1 Answer 1

up vote 2 down vote accepted

The 010 101 button is now {}, which has the same action as the keyboard shortcut Ctrl + k, which is to indent the selected block 4 spaces, marking it as code.

That's how you would do it.

However, there is normally no need to post an entire HTML document - just posting the relevant sections should do (and a link to a working jsFiddle can only help).

share|improve this answer
    
It's for Code Review. I should have said that instead of SE, but I wasn't sure people would know what it was. And it's only about 40 lines. –  John Fitzpatrick Dec 1 '12 at 11:46
    
@JohnFitzpatrick - Fair enough. It doesn't matter if it is a whole document or a few lines of code - both cases are served by the same action, namely the above options. –  Oded Dec 1 '12 at 11:47

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