Skip to content

Commit 3c29e02

Browse files
hugokerstensjbweston
authored andcommitted
Fix default thebe button text
1 parent 4b5a823 commit 3c29e02

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jupyter_sphinx/execute.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ class ThebeButton(Directive):
214214
has_content = False
215215

216216
def run(self):
217-
text = self.arguments[0] if self.arguments else ''
218-
return [ThebeButtonNode(text)]
217+
kwargs = {'text': self.arguments[0]} if self.arguments else {}
218+
return [ThebeButtonNode(**kwargs)]
219219

220220

221221
class JupyterCellNode(docutils.nodes.container):
@@ -272,8 +272,8 @@ class ThebeButtonNode(docutils.nodes.Element):
272272
If no ThebeButton directive is found in the document but thebelab
273273
is enabled, the node is added at the bottom of the document.
274274
"""
275-
def __init__(self, text):
276-
super().__init__('', text=text or 'Make live')
275+
def __init__(self, text='Make live'):
276+
super().__init__('', text=text)
277277

278278
def html(self):
279279
text = self['text']

0 commit comments

Comments
 (0)