\[ in code triggers LateX in preview

When the code contains the characters \[, the preview shows everything else as LateX even though it is inside the  section. This is how the preview looks like:

This is how the submission actually looks like: