Skip to content

Commit

Permalink
Fixed incorrect inkscape naming
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeal committed Jun 8, 2021
1 parent 7254202 commit f16c681
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions nbconvert/preprocessors/svg2pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def _command_default(self):
if int(major_version) < 1:
# --without-gui is only needed for inkscape 0.x
command.append('--without-gui')
# --export-filename is old name for --export-pdf
command.append('--export-filename={to_filename}')
else:
# --export-pdf is old name for --export-filename
command.append('--export-pdf={to_filename}')
else:
command.append('--export-filename={to_filename}')

command.append('{from_filename}')
return command
Expand Down
4 changes: 2 additions & 2 deletions nbconvert/preprocessors/tests/test_svg2pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ def test_inkscape_pre_v1_command(self):
assert preprocessor.command == [
'fake-inkscape',
'--without-gui',
'--export-filename={to_filename}',
'--export-pdf={to_filename}',
'{from_filename}'
]

def test_inkscape_v1_command(self):
preprocessor = self.build_preprocessor(inkscape='fake-inkscape', inkscape_version='1.0beta2')
assert preprocessor.command == [
'fake-inkscape',
'--export-pdf={to_filename}',
'--export-filename={to_filename}',
'{from_filename}'
]

0 comments on commit f16c681

Please sign in to comment.