Skip to main content

You can't highlight a language with Markdown. You need to outsource this to external libraries. Such as.

  1. SyntaxHighlighter
  2. Google Code Prettify
  3. Pygments

EDIT: The StackOverflow way of doing this is to have a comment at the top. Like so.

<!-- language: lang-js -->

Just replace lang-js with one of the language codes or a tag to set the language to the language associated with that tag. For example.

<!-- language: C#c# -->

Highlighting for C#c# is associated with the C#c# tag.

(use lowercase letters, uppercase letters like <!-- language: C# --> does not work.)

You can't highlight a language with Markdown. You need to outsource this to external libraries. Such as.

  1. SyntaxHighlighter
  2. Google Code Prettify
  3. Pygments

EDIT: The StackOverflow way of doing this is to have a comment at the top. Like so.

<!-- language: lang-js -->

Just replace lang-js with one of the language codes or a tag to set the language to the language associated with that tag. For example.

<!-- language: C# -->

Highlighting for C# is associated with the C# tag.

You can't highlight a language with Markdown. You need to outsource this to external libraries. Such as.

  1. SyntaxHighlighter
  2. Google Code Prettify
  3. Pygments

EDIT: The StackOverflow way of doing this is to have a comment at the top. Like so.

<!-- language: lang-js -->

Just replace lang-js with one of the language codes or a tag to set the language to the language associated with that tag. For example.

<!-- language: c# -->

Highlighting for c# is associated with the c# tag.

(use lowercase letters, uppercase letters like <!-- language: C# --> does not work.)

replaced http://meta.stackexchange.com/ with https://meta.stackexchange.com/
Source Link

You can't highlight a language with Markdown. You need to outsource this to external libraries. Such as.

  1. SyntaxHighlighter
  2. Google Code Prettify
  3. Pygments

EDIT: The StackOverflow way of doing this is to have a comment at the top. Like so.

<!-- language: lang-js -->

Just replace lang-js with one of the language codesone of the language codes or a tag to set the language to the language associated with that tag. For example.

<!-- language: C# -->

Highlighting for C# is associated with the C# tag.

You can't highlight a language with Markdown. You need to outsource this to external libraries. Such as.

  1. SyntaxHighlighter
  2. Google Code Prettify
  3. Pygments

EDIT: The StackOverflow way of doing this is to have a comment at the top. Like so.

<!-- language: lang-js -->

Just replace lang-js with one of the language codes or a tag to set the language to the language associated with that tag. For example.

<!-- language: C# -->

Highlighting for C# is associated with the C# tag.

You can't highlight a language with Markdown. You need to outsource this to external libraries. Such as.

  1. SyntaxHighlighter
  2. Google Code Prettify
  3. Pygments

EDIT: The StackOverflow way of doing this is to have a comment at the top. Like so.

<!-- language: lang-js -->

Just replace lang-js with one of the language codes or a tag to set the language to the language associated with that tag. For example.

<!-- language: C# -->

Highlighting for C# is associated with the C# tag.

Migration of MSO links to MSE links
Source Link

You can't highlight a language with Markdown. You need to outsource this to external libraries. Such as.

  1. SyntaxHighlighter
  2. Google Code Prettify
  3. Pygments

EDIT: The StackOverflow way of doing this is to have a comment at the top. Like so.

<!-- language: lang-js -->

Just replace lang-js with one of the language codesone of the language codes or a tag to set the language to the language associated with that tag. For example.

<!-- language: C# -->

Highlighting for C# is associated with the C# tag.

You can't highlight a language with Markdown. You need to outsource this to external libraries. Such as.

  1. SyntaxHighlighter
  2. Google Code Prettify
  3. Pygments

EDIT: The StackOverflow way of doing this is to have a comment at the top. Like so.

<!-- language: lang-js -->

Just replace lang-js with one of the language codes or a tag to set the language to the language associated with that tag. For example.

<!-- language: C# -->

Highlighting for C# is associated with the C# tag.

You can't highlight a language with Markdown. You need to outsource this to external libraries. Such as.

  1. SyntaxHighlighter
  2. Google Code Prettify
  3. Pygments

EDIT: The StackOverflow way of doing this is to have a comment at the top. Like so.

<!-- language: lang-js -->

Just replace lang-js with one of the language codes or a tag to set the language to the language associated with that tag. For example.

<!-- language: C# -->

Highlighting for C# is associated with the C# tag.

Post Migrated Here from stackoverflow.com (revisions)
Source Link
user184498
user184498
Loading