Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
kvid committed Jul 21, 2020
1 parent ba4b900 commit 6a2b197
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wireviz/build_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def build(dirname):

with open_file_append(path / readme) as out:
if include_readme:
with open_file_read(path / f'{yaml_file.stem}.md') as info:
with open_file_read(yaml_file.with_suffix('.md')) as info:
for line in info:
out.write(line.replace('## ', '## {} - '.format(i)))
out.write(line.replace('## ', f'## {i} - '))
out.write('\n\n')
else:
out.write(f'## Example {i}\n')
Expand Down

0 comments on commit 6a2b197

Please sign in to comment.