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

Skip to content

Commit 301fa0a

Browse files
committed
Only insert links to pdfs if we are actually generating these. This should
silence most warnings in the html only small build on travis
1 parent cb36b28 commit 301fa0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,9 @@ def remove_coding(text):
383383
{{ only_latex }}
384384
385385
{% for img in images %}
386+
{% if 'pdf' in img.formats -%}
386387
.. image:: {{ build_dir }}/{{ img.basename }}.pdf
388+
{% endif -%}
387389
{% endfor %}
388390
389391
{{ only_texinfo }}

0 commit comments

Comments
 (0)