Skip to main content
replaced http://meta.stackexchange.com/ with https://meta.stackexchange.com/
Source Link

This is called syntax highlightingsyntax highlighting as explained over in the SE-meta post :

Before you do anything, are you sure that you've got the correct highlighting turned on? Behind the scenes, Stack Exchanges uses the tags on the question to infer the language you are using. If there's more than one tag that has syntax highlighting, it uses a default and lets Prettify infer what's the best language to use. If you're curious whether a tag has a language hint, any user is capable of checking by visiting that tag's wiki page.

Bolding mine. So, if you're offering a code answer to a question that isn't tagged with the code, you won't get syntax highlighting by default.

You can force a specific syntax by using Prettify language codes. Put this immediately before a code block, and it'll be highlighted as Bash:

<!-- language: bash -->

    for f in *.mp3; do echo "$f"; done

This is called syntax highlighting as explained over in the SE-meta post :

Before you do anything, are you sure that you've got the correct highlighting turned on? Behind the scenes, Stack Exchanges uses the tags on the question to infer the language you are using. If there's more than one tag that has syntax highlighting, it uses a default and lets Prettify infer what's the best language to use. If you're curious whether a tag has a language hint, any user is capable of checking by visiting that tag's wiki page.

Bolding mine. So, if you're offering a code answer to a question that isn't tagged with the code, you won't get syntax highlighting by default.

You can force a specific syntax by using Prettify language codes. Put this immediately before a code block, and it'll be highlighted as Bash:

<!-- language: bash -->

    for f in *.mp3; do echo "$f"; done

This is called syntax highlighting as explained over in the SE-meta post :

Before you do anything, are you sure that you've got the correct highlighting turned on? Behind the scenes, Stack Exchanges uses the tags on the question to infer the language you are using. If there's more than one tag that has syntax highlighting, it uses a default and lets Prettify infer what's the best language to use. If you're curious whether a tag has a language hint, any user is capable of checking by visiting that tag's wiki page.

Bolding mine. So, if you're offering a code answer to a question that isn't tagged with the code, you won't get syntax highlighting by default.

You can force a specific syntax by using Prettify language codes. Put this immediately before a code block, and it'll be highlighted as Bash:

<!-- language: bash -->

    for f in *.mp3; do echo "$f"; done
added 188 characters in body
Source Link
slhck Mod
  • 232.5k
  • 4
  • 79
  • 150

This is called syntax highlighting as explained over in the SE-meta post :

Before you do anything, are you sure that you've got the correct highlighting turned on? Behind the scenes, Stack Exchanges uses the tags on the question to infer the language you are using. If there's more than one tag that has syntax highlighting, it uses a default and lets Prettify infer what's the best language to use. If you're curious whether a tag has a language hint, any user is capable of checking by visiting that tag's wiki page.

Bolding mine. So, if you're offering a code answer to a question that isn't tagged with the code, you won't get syntax highlighting by default. It will appear if the tag is added

You can force a specific syntax by using Prettify language codes. Put this immediately before a code block, and it'll be highlighted as Bash:

<!-- language: bash -->

    for f in *.mp3; do echo "$f"; done

This is called syntax highlighting as explained over in the SE-meta post :

Before you do anything, are you sure that you've got the correct highlighting turned on? Behind the scenes, Stack Exchanges uses the tags on the question to infer the language you are using. If there's more than one tag that has syntax highlighting, it uses a default and lets Prettify infer what's the best language to use. If you're curious whether a tag has a language hint, any user is capable of checking by visiting that tag's wiki page.

Bolding mine. So, if you're offering a code answer to a question that isn't tagged with the code, you won't get syntax highlighting. It will appear if the tag is added.

This is called syntax highlighting as explained over in the SE-meta post :

Before you do anything, are you sure that you've got the correct highlighting turned on? Behind the scenes, Stack Exchanges uses the tags on the question to infer the language you are using. If there's more than one tag that has syntax highlighting, it uses a default and lets Prettify infer what's the best language to use. If you're curious whether a tag has a language hint, any user is capable of checking by visiting that tag's wiki page.

Bolding mine. So, if you're offering a code answer to a question that isn't tagged with the code, you won't get syntax highlighting by default.

You can force a specific syntax by using Prettify language codes. Put this immediately before a code block, and it'll be highlighted as Bash:

<!-- language: bash -->

    for f in *.mp3; do echo "$f"; done
Source Link
Raystafarian
  • 21.9k
  • 13
  • 29

This is called syntax highlighting as explained over in the SE-meta post :

Before you do anything, are you sure that you've got the correct highlighting turned on? Behind the scenes, Stack Exchanges uses the tags on the question to infer the language you are using. If there's more than one tag that has syntax highlighting, it uses a default and lets Prettify infer what's the best language to use. If you're curious whether a tag has a language hint, any user is capable of checking by visiting that tag's wiki page.

Bolding mine. So, if you're offering a code answer to a question that isn't tagged with the code, you won't get syntax highlighting. It will appear if the tag is added.