It seems as though often the syntax highlighter does not detect the language I'm working in.

When this happens, I try to be responsible and apply the manual highlighting comment: `<!-- language: NAME -->`.

However, it's hard for me to remember this syntax because it is _finicky_.

Consider the following examples of the highlighting comment with subtle changes in spacing:

`<!-- language: python -->`

<!-- language: python -->

    for i in range(10):
      print('hi')

`<!--language: python -->`

<!--language: python -->

    for i in range(10):
      print('hi')

`<!-- language: python-->`

<!-- language: python-->

    for i in range(10):
      print('hi')

`<!--language:python-->`

<!--language:python-->

    for i in range(10):
      print('hi')

`<!-- language:python -->`

<!-- language:python -->

    for i in range(10):
      print('hi')

`<!-- language:    python -->`

<!-- language:    python -->

    for i in range(10):
      print('hi')

Since the foregoing doesn't display on Meta, I have an image:

[![Finicky highlighting syntax][1]][1]

In all cases, the comments are detected as such, but in only some cases is highlighting applied as a result.

Is there a way to make this command less finicky and, hopefully, thereby easier to use?


  [1]: https://i.sstatic.net/IK4T0.png