Simplified logic for generating rst file
Simplified logic for generating rst file

The loop that writes the rst information of the example script file is
unique. The control of weather the script is executed is evaluated in
the execute block, not in the rst generator.

lesteve/sphinx-gallery,Titan-C/sphinx-gallery,sphinx-gallery/sphinx-gallery,sphinx-gallery/sphinx-gallery,lesteve/sphinx-gallery,Titan-C/sphinx-gallery,Eric89GXL/sphinx-gallery,Eric89GXL/sphinx-gallery