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

syntax highlight in traceback view #31

Merged
merged 3 commits into from
Feb 21, 2016

Conversation

mihnatenko
Copy link
Contributor

No description provided.

@mihnatenko
Copy link
Contributor Author

It works, but not finished yet. Some code should be removed.

To highlight current line I'm splitting source code to lines and wrapping it with span.current. Looks like a hack, but works.
Also, highlight.js doesn't support line numbers, which are useful in this case, I think. So, I can try to add them somehow. Or maybe it would be better to try prinsm.js, which has line numbers and line highlight?

@jettify
Copy link
Member

jettify commented Oct 19, 2015

prism.js looks like actively maintained, so why not

@asvetlov
Copy link
Member

I've never used prism but was happy with highlight.js.
Anyway, if you guys choose prism.js I have no objections.

@jettify
Copy link
Member

jettify commented Nov 6, 2015

@stormandco sorry of delay I will review this PR as soon as resolve issue with interactive debugger

@mihnatenko
Copy link
Contributor Author

@jettify no problem. I think it needs some cleanup in tbtools.py
Will try to do this on the weekends

@jettify
Copy link
Member

jettify commented Nov 6, 2015

tbtools.py very dirty port that handles interactive console logic, tracebacks etc, ported from flask to pyramid_debugtoolbar and then here... I have not touched that much because I managed to make it work. To rewrite that chunk is bit tricky task.

@mihnatenko
Copy link
Contributor Author

At least class Line, SOURCE_TABLE_HTML, SOURCE_LINE_HTML strings, and some methods in Frame should be removed

@jettify
Copy link
Member

jettify commented Nov 6, 2015

sure, if it simplifies code greatly, it would be easer to refactor interactive console as result get rid of thread locals

@mihnatenko
Copy link
Contributor Author

@jettify @asvetlov
Could you please review this PR?

@asvetlov
Copy link
Member

asvetlov commented Feb 7, 2016

I'll take a look in few days.

@asvetlov asvetlov merged commit f9de7cb into aio-libs:master Feb 21, 2016
@asvetlov
Copy link
Member

Sorry for long delay.
Thank you for both the patch and your patience.

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

Successfully merging this pull request may close these issues.

3 participants