Skip to content

Commit 927de5e

Browse files
committed
DOC ensure longer underline
1 parent 937f36c commit 927de5e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/sphinxext/gen_rst.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -640,12 +640,12 @@ def generate_dir_rst(dir, fhindex, example_dir, root_dir, plot_gallery, seen_bac
640640
seen = backref in seen_backrefs
641641
with open(include_path, 'a' if seen else 'w') as ex_file:
642642
if not seen:
643-
ex_file.write(dedent('''
644-
645-
Examples using ``%s``
646-
-----------
647-
648-
''' % backref))
643+
# heading
644+
print(file=ex_file)
645+
print('Examples using ``%s``' % backref, file=ex_file)
646+
print('-----------------%s--' % ('-' * len(backref)),
647+
file=ex_file)
648+
print(file=ex_file)
649649
rel_dir = os.path.join('../../auto_examples', dir)
650650
ex_file.write(_thumbnail_div(dir, rel_dir, fname, snippet))
651651
seen_backrefs.add(backref)

0 commit comments

Comments
 (0)