Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line comments in Python not properly highlighted #2891

Closed
Peque opened this issue May 17, 2016 · 12 comments
Closed

Multi-line comments in Python not properly highlighted #2891

Peque opened this issue May 17, 2016 · 12 comments

Comments

@Peque
Copy link

Peque commented May 17, 2016

It seems that multi-line comments in Python are not highlighted properly. See for example:

screenshot from 2016-05-17 19-45-27

Lines 1 to 3 should be highlighted in red, rather than just the first line, right?

This particular submission can be found here.

@amalrik
Copy link

amalrik commented May 17, 2016

I suspect this can be a problem with rouge gem
I have reproduced the same behavior on my local machine and
I can take a deeper look at this in worst case at the weekend.

@amalrik
Copy link

amalrik commented May 23, 2016

Unfortunately this will require more effort than I thought.
My investigation led me to this class lib/rouge/formatters/html_exercism.rb which is where I think the problem belongs but I'm not sure yet why.
I going to try to solve this puzzle again on Thursday.

@Peque
Copy link
Author

Peque commented May 23, 2016

@amalrik May the Force be with you! 💪

@amalrik
Copy link

amalrik commented May 23, 2016

😃 tks!

@Insti
Copy link

Insti commented Aug 3, 2016

We've recently updated the Rouge gem that does the syntax highlighting. Is this still an issue?

@Peque
Copy link
Author

Peque commented Aug 3, 2016

@Insti Is the update in production? If so, it seems it is still an issue, yes:

http://exercism.io/submissions/205b88badb0d41a18ee78f97c7cc6a36

@Insti
Copy link

Insti commented Aug 3, 2016

@Peque yes it is in, but that code has already been rendered and converted to html, are you able to submit a new iteration?

@Insti
Copy link

Insti commented Aug 3, 2016

Confirmed still broken: http://exercism.io/submissions/8146d9059e7d4690ae4633b7f2192b95

@Insti
Copy link

Insti commented Aug 3, 2016

Code renders correctly on the Rouge demo page: http://rouge.jneen.net/pastes/XQGP
exercism - python syntax highlighting

@Insti
Copy link

Insti commented Aug 3, 2016

@amalrik do you have any more information/clues that might help solve this?

@Insti
Copy link

Insti commented Aug 3, 2016

Clue, Pull reqest: #2838
This is the origin of the lib/rouge/formatters/html_exercism.rb file.
Maybe something is missing that is in the original rouge/formatters/html.rb file (which might have been updated.)?

@Insti
Copy link

Insti commented Aug 9, 2016

Clue, Issue: #3044
Also happens in OCaml
It seems that when the line numbers are added the 'c' (comment?) css class is not maintained after the first line. So I suspect the problem is with the code that adds the line numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants