ZuxingGit / pygments

Pygments is a generic syntax highlighter written in Python
http://pygments.org/
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

#2671 #2

Open adluu2k1 opened 6 months ago

adluu2k1 commented 6 months ago

https://github.com/pygments/pygments/issues/2671

ZuxingGit commented 6 months ago

JavaScript: before vs after

image image

TypeScript: before vs after

image image
ZuxingGit commented 6 months ago

Semicolon is added to the end of line, which is different from the issue's sample code. Should I delete it when testing?

adluu2k1 commented 6 months ago

Semicolon is not important in JS, I believe. But yes, you should delete it since we need the test code to be the same as the code in the original issue

ZuxingGit commented 6 months ago

JavaScript: before vs after

image image

TypeScript: before vs after

image image
trungtruong1 commented 6 months ago

@ZuxingGit Hi, is the fix for the issue complete?

ZuxingGit commented 6 months ago

@ZuxingGit Hi, is the fix for the issue complete?

I will test it using Ishaan's method today. #3

ZuxingGit commented 6 months ago
image image

So, I guess it passed all

adluu2k1 commented 6 months ago

In case you misunderstand how the command in Ishaan's method works. It doesn't check correctness of the output and, instead, it overwrite the old output with the one resulted from the current code (mind the --update-goldens option). Using Ishaan's method, you can check whether the sample code is highlighted correctly by looking at what is returned in the area in question.

adluu2k1 commented 6 months ago

I'll check this soon. If there's no problem with the output, I guess it's ok to create PR for this issue.