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

Skip to content

Commit 04d2316

Browse files
committed
Fix plot directive when used with multiple options.
The existing template produces newlines between options, which were confusing the reST parser. By fiddling with whitespace control, the template can be made to put things together correctly.
1 parent abfcde6 commit 04d2316

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def remove_coding(text):
421421
422422
{% for img in images %}
423423
.. figure:: {{ build_dir }}/{{ img.basename }}.png
424-
{%- for option in options %}
424+
{% for option in options -%}
425425
{{ option }}
426426
{% endfor %}
427427
@@ -447,7 +447,7 @@ def remove_coding(text):
447447
448448
{% for img in images %}
449449
.. image:: {{ build_dir }}/{{ img.basename }}.png
450-
{%- for option in options %}
450+
{% for option in options -%}
451451
{{ option }}
452452
{% endfor %}
453453

0 commit comments

Comments
 (0)