Problem in Python syntax highlighting

Dear admins,

There seems to be a problem with syntax highlighting for Python. Below are two example code blocks, both are marked as Python:

import blah
a = 1
import blah
a + 1

As you can see, the syntax highlighting is completely gone in the first block. This seems to be caused somehow by the presence of ‘import’ and equal sign. You can also find more complex real-life examples in this post.

Hi,

Try with ```python (all lowercase):

import blah
a = 1
import blah
a + 1

Cheers, Bertrand.

Thank you. This seems to work, indeed. Also for the real-life examples in the other thread.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.