Skip to content

Commit

Permalink
Docs: Preprocessor for Python < 3.12
Browse files Browse the repository at this point in the history
Preprocessor script was using syntax that works with Python 3.12 but
not with older version.
Namely, string in format string using the same delimiter as
outer string. Example: f'abc{'def'}xyz'

This commit changes delimiters of inner string to make script
compatible with older versions of Python.
  • Loading branch information
Lorak-mmk committed Feb 2, 2024
1 parent e94f8f9 commit 8b15454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sphinx_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def remove_sphinx_markdown(md_file_text, name):

def process_section(section):
if 'Chapter' in section:
print(f'Processing chapter {section['Chapter']['name']}', file=sys.stderr)
print(f'Processing chapter {section["Chapter"]["name"]}', file=sys.stderr)
section['Chapter']['content'] = remove_sphinx_markdown(section['Chapter']['content'], section['Chapter']['name'])
for s in section['Chapter']['sub_items']:
process_section(s)
Expand Down

0 comments on commit 8b15454

Please sign in to comment.