Skip to content

Commit

Permalink
scrape_docs replace indentation spaces with rst replacer
Browse files Browse the repository at this point in the history
  • Loading branch information
JOJ0 committed Oct 1, 2024
1 parent d1a3eac commit bbfc3bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scrape_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ def scrape(output, url):
if e.parent.name == h:
# h1 is no spacing (decrease by 1),
# h2 is 2 spaces, h3 is 4....
# two literal spaces are replaced by '|indent| '
spacing_count = int(e.parent.name[-1]) - 1
for val in range(0, spacing_count * 2):
spacing += ' '
spacing += '|indent| '
rst = f'{spacing}`{e.text} <{fulllink}>`_'
if output == 'csv':
left_col = f'"{rst}"'
Expand Down

0 comments on commit bbfc3bb

Please sign in to comment.