Skip to content

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Mar 18, 2023

📚 Description

A copy button is added to the top right of each code block in the HTML documentation.

Key added functionality, compared to just selecting the code and copy-pasting it to a Sage session:

  • it's just one click
  • the output of doctests is omitted
  • comments (in particular the many new # optional - ... comments) are stripped away

Example: https://deploy-preview-35304--sagemath-tobias.netlify.app/reference/discrete_geometry/sage/geometry/polyhedron/base7.html#sage.geometry.polyhedron.base7.Polyhedron_base7.volume

Resolves #35239

📝 Checklist

  • I have made sure that the title is self-explanatory and the description concisely explains the PR.
  • I have linked an issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@github-actions
Copy link

Documentation preview for this PR is ready! 🎉
Built with commit: ebe73c9

Copy link
Contributor

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition! The build workflow timed-out, I've restarted it. Feel free to put it to 'positive-review' once the build succeeds.

Copy link
Collaborator

@kwankyu kwankyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Very convenient.

@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (f449b14) 88.62% compared to head (ebe73c9) 88.61%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35304      +/-   ##
===========================================
- Coverage    88.62%   88.61%   -0.01%     
===========================================
  Files         2148     2148              
  Lines       398653   398653              
===========================================
- Hits        353308   353270      -38     
- Misses       45345    45383      +38     

see 27 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 19, 2023

Thanks!

@vbraun vbraun merged commit ea678b9 into sagemath:develop Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: use sphinx-copybutton
5 participants