1

Possible Duplicates:
stackoverflow syntax highlighting
Syntax highlighting hints

Stack Overflow awesomely detects what language a code block is and syntax highlights it accordingly. But sometimes it fails. Is it possible to explicitly tell it what the language is?

php:

if ( force_ssl_admin() && !is_ssl() ) {
 if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
 wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI']));
 exit();
 } else {
 wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
 exit();
 }
}

ruby:

def destroy
 @payment = Payment.find(params[:id])
 @payment.destroy
 redirect_to :back
end

yaml (FAIL)

foo: this is foo!
bar: this is bar!
id: 5
asked Jun 29, 2010 at 14:11
6
  • 2
    This is a good question, but it belongs on meta.stackoverflow.com You would get a much better answer there. To my knowledge, the answer is no. Commented Jun 29, 2010 at 14:12
  • Thanks! I'll ask it there. Do you think I should delete this question? Commented Jun 29, 2010 at 14:13
  • The answer is most definitely no. Commented Jun 29, 2010 at 14:15
  • Duplicate of meta.stackexchange.com/questions/981/syntax-highlighting-hints Commented Jun 29, 2010 at 14:16
  • No. A similar question is here meta.stackexchange.com/questions/13469/… Commented Jun 29, 2010 at 14:16
  • The greasemonkey script here does what you want. Commented Jun 29, 2010 at 15:46

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.