Skip to content

Commit 647d12f

Browse files
Docs: Minor fixes
1 parent d0d5076 commit 647d12f

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

docs/source/conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,15 @@ def convert_github_admonitions(text):
137137

138138
if not admonition_found:
139139
if in_admonition:
140-
if line.strip().startswith("> "):
140+
strip_line = line.strip()
141+
if strip_line.startswith("> "):
141142
# Content of admonition - remove the "> " prefix
142-
content = line[line.find("> ") + 2 :]
143+
content = strip_line[2:]
143144
converted_lines.append(content)
144-
elif line.strip() == ">":
145+
elif strip_line == ">":
145146
# Empty line in admonition
146147
converted_lines.append("")
147-
elif line.strip() == "":
148+
elif strip_line == "":
148149
# Empty line - could be end of admonition or just spacing
149150
converted_lines.append("")
150151
else:
@@ -164,7 +165,7 @@ def convert_github_admonitions(text):
164165
return "\n".join(converted_lines)
165166

166167

167-
def preprocess_readme_for_sphinx(app, config):
168+
def preprocess_readme_for_sphinx(app, config): # pylint: disable=unused-argument
168169
"""Preprocess README.md to convert GitHub admonitions before Sphinx build."""
169170
# Calculate paths relative to the docs directory
170171
docs_dir = Path(app.srcdir)

0 commit comments

Comments
 (0)