2

See:

https://stackoverflow.com/posts/7300401/revisions

It doesn't do highlighting when I specify <!-- language: lang-mysql --> (or if the question is tagged mysql), but it will work fine if I use lang-sql instead.

I guess it's just that mysql is not associated with any particular highlighting, but that's a little weird since it's one of the most popular tags out there.

0

2 Answers 2

3

There are three ways to achieve the appropriate syntax highlighting:

  1. Use the default syntax highlighting for the language associated with the tag attached to the question.
    For example, supply no syntax highlighting hint when the question is tagged which is associated with language "lang-sql"

  2. Explicitly supply a syntax highlighting "lang" hint from the supported language values.
    For example, <!-- language: lang-sql -->

  3. Explicitly supply a syntax highlighting "tag" hint that indirectly has a language associated with it.
    For example, <!-- language: mysql -->

For the answer you gave, any one of these three techniques would work but you mixed up the second and third techniques by combining the "lang-" prefix with the tag , which works when tag and language names coincide, but not in this case.

2

Read this question.

It happens because

  • lang-mysql is not supported
  • lang-sql is supported

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