Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b796692

Browse files
committed
gotten in the habit of dropping field numbers which is an issue for python < 2.7, did not mean to do that here though so adding them in
1 parent ae139df commit b796692

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rst2ipynblib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def translate(self):
4141
self.document.walkabout(visitor)
4242
for attr in self.visitor_attributes:
4343
setattr(self, attr, getattr(visitor, attr))
44-
self.output = '{}'.format(nbformat.writes(visitor.nb, 'ipynb'))
44+
self.output = '{0}'.format(nbformat.writes(visitor.nb, 'ipynb'))
4545

4646

4747
class IPYNBTranslator(nodes.NodeVisitor):
@@ -63,7 +63,7 @@ def __init__(self, document):
6363
self.nb = nbformat.new_notebook(worksheets=[ws])
6464

6565
def astext(self):
66-
return '{}'.format(nbformat.writes(self.nb, 'ipynb'))
66+
return '{0}'.format(nbformat.writes(self.nb, 'ipynb'))
6767

6868
def is_ref_error_paragraph(self, p):
6969
return p == "Unknown interpreted text role \"ref\"."

0 commit comments

Comments
 (0)