-
Notifications
You must be signed in to change notification settings - Fork 74
Add a Pygments lexer for MIR output, and fix HTML escaping. #200
Conversation
Also fixes the problem of insufficient HTML escaping of MIR output in the playpen's result pane by neither highlighting nor escaping it.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This is going to be... interesting to rewrite in Rust for #187 |
Well, as it happens I was just beginning to port parts of Pygments to Rust. I could probably have a version with the three lexers in question ready pretty soon. |
Regardless, could the escaping bug be fixed now at least? It is actively hurting readability of the MIR output. |
Oh, please don't hold back features because of the rewrite. I'm fine with either waiting for your Pygments port or writing a temporary highlighter for #187. |
Thanks @birkenfeld! Sounds reasonable to merge for now and tackle in the rewrite in #187 later. @jonas-schievink also I still hope to get around to taking a closer look soon, sorry it's taking awhile :( |
Ah unfortunately it looks like this breaks the MIR button as it also requires some JS changes, perhaps those could be prep'd as well? |
Sorry - looks like I'll have to set up a local instance after all. Stand by... |
(Side note: Thanks Alex for restarting play-pen, I've been waiting for that feature when you press Esc key after clicking Run button, to kick in for a while now :D EDIT: confirmed working on both firefox(46.0) and chromium(52.0.2716.0)) |
@NotaseCretagen oh oops! Feel free to ping me if it ever needs a restart and I'm not getting around to it |
Also fixes the problem of insufficient HTML escaping of MIR output
by neither highlighting nor escaping it.