Fixed syntax highlighting for different languages

Partially fixes issue mentioned in #1131.