Syntax Not all highlighting

Problem description

When I use the syntax \n to start a new line when using print

Expected behavior

My code should highlight the syntax \n

Actual behavior

\n does not highlight at all

Steps to reproduce

this is the code I used:

print("Hello World!\nHello World!\nHello World!")

Browser

Opera Gx and Google Chrome

OS

Windows X

Device if mobile

N/A

Plan

Free tier

If this is on the forum, use:

```py
print("Hello World!\nHello World!\nHello World!")
```

and it should look like this:

print("Hello World!\nHello World!\nHello World!")

@Firepup650 you forgot the .py in the ```py in the post


However, if this is on the .py files in Replit, could you show a screenshot of what you are seeing?
Thanks!

:wave: Hey @jeffreyb09, welcome!

There was a topic about this before but I have searched for a while and can’t find it.

Escape codes are not highlighted in Python, but they are in JS and the C family. I don’t think this is really a bug, though

1 Like

I tried it in my Python file and it’s highlighted?
Maybe a theme issue?

What? Escape codes (\something) are not and have never been highlighted differently in Python.


Well, I see it highlighted.

That… is not highlighted.

This is highlighted.

image

1 Like

Ohh. I see. Sorry, my mistake.

2 Likes

Yeah. I agree with @QwertyQwerty88 that it isn’t necessarily a bug, but I’ll discuss with the team. Probably not going to be high priority but thanks for bringing it up for discussion.

3 Likes

The team decided to address this so you should see the highlighting now for escapes in Python. Happy coding!

2 Likes

Yup, I see the change! That was surprisingly quick, just a month after this report was made. :woman_shrugging:

2 Likes

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