Add sphinx copybutton extension#865
Conversation
|
(please test this out with |
There was a problem hiding this comment.
Works well apart from diff blocks:
What ends up copied:
[scheduler]
allow implicit tasks = True
[scheduling]
cycling mode = integer
initial cycle point = 1
[[graph]]
- R1 = """
P1 = """
buy_ingredients => make_dough
pre_heat_oven & make_dough => bake_bread
bake_bread => sell_bread & clean_oven
"""
However I'm not sure if there is a good need to copy diff blocks.
Also, it might be tricky to solve as there is something funky going on with diff blocks when you try to select the text:
Diff blocks have some CSS rules to make it easier for users to copy paste: https://cylc.github.io/cylc-sphinx-extensions/extensions/cylc.sphinx_ext.diff_selection.html However, this is CSS only, just display, nothing is different about these blocks otherwise. Suggest turning the copy feature off for diff blocks to avoid user pain in training sessions? Or finding a way to hack it? |
4490dac to
46a4276
Compare
|
(Test failures will be fixed by #866) |
Requirements check-list
CONTRIBUTING.mdand added my name as a Code Contributor.Add a copy button to code snippets.
I've wanted to do this for ages, but last time I looked this extension didn't exist.
Built at https://████████████████/doc/cylc/8.5.2.dev/html/tutorial/scheduling/graphing.html#example