-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add copybutton functionality #98
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments while you're working on this.
So for the MATLAB sessions, there shouldn't need to be a prompt set on the second line after a continuation. This is a bug in Pygments and I filed pygments/pygments#1399 to address this. I just want to see if I can get a response there before merging this. |
@bryanwweber I noticed that too, added the prompts so that the continuation wouldn't erroneously be displayed as output, as was the case with the bug. Thanks for fixing it! |
The extra prompt characters were necessary to work around a bug in Pygments with respect to Matlab line continuation characters. The bug is fixed in the fork of the Pygments repository that is specified in requirements.txt. The branch has an open pull request at pygments/pygments#1399.
Pygments is picking up the multiple spaces after the = and doing something weird with the formatting.
Closes issue #17.
This pull request adds the copybutton functionality from Python Docs to all Python Console and Matlab Command Window codeblocks on the Cantera website.