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

Demonstration of selecting only commands using Pygments-only #186

Closed

Commits on Nov 17, 2022

  1. Demonstration of selecting only commands using Pygments-only

    - Remove the prompt regexes and set `copybutton_exclude='.linenos,
      .gp, .go'`.  We get a similar behaviour as before, but with no
      custom configuration and would (in theory) work with any
      Pygments-supported language.
    
    - This is a demonstration of solution (b) in executablebooks#185.  We don't define
      prompt or output regexes, but let Pygments lex it and give it css
      classes.  Here, we exclude Generic.Prompt and Generic.Output
      classes.
    
    - The formatCopyText function had to be adjusted, since the "remove
      blank lines" only worked if the prompt detection was on.  This
      re-ordering enables it all the time, which isn't great, since it can
      remove other meaningful blank lines.  It needs to be thought out
      better.
    
    - The IPython and bash lexers are changed to their respective console
      lexers.
    
    - Here documents don't seem to work.  Pygments could be improved to
      support this better.
    
    - Further discussion is in executablebooks#185.  This should not be merged.
    rkdarst committed Nov 17, 2022
    Configuration menu
    Copy the full SHA
    e08ed5e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8b31d29 View commit details
    Browse the repository at this point in the history