Skip to content

Commit

Permalink
Fix custom directive 'galleryitem' (pytorch#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
chsasank authored Oct 18, 2017
1 parent 055a90e commit d235bc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def run(self):
if 'intro' in self.options:
intro = self.options['intro'][:195] + '...'
else:
intro = sphinx_gallery.gen_rst.extract_intro(abs_fname)
_, blocks = sphinx_gallery.gen_rst.split_code_and_text_blocks(abs_fname)
intro, _ = sphinx_gallery.gen_rst.extract_intro_and_title(abs_fname, blocks[0][1])

thumbnail_rst = sphinx_gallery.backreferences._thumbnail_div(
dirname, basename, intro)
Expand Down

0 comments on commit d235bc2

Please sign in to comment.