We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebed4ce commit a0bc50fCopy full SHA for a0bc50f
pep_sphinx_extensions/pep_processor/transforms/pep_headers.py
@@ -102,6 +102,14 @@ def apply(self) -> None:
102
# Mark unneeded fields
103
fields_to_remove.append(field)
104
105
+ # Remove any trailing commas and whitespace in the headers
106
+ if para and isinstance(para[-1], nodes.Text):
107
+ last_node = para[-1]
108
+ if last_node.astext().strip() == ",":
109
+ last_node.parent.remove(last_node)
110
+ else:
111
+ para[-1] = last_node.rstrip().rstrip(",")
112
+
113
# Remove unneeded fields
114
for field in fields_to_remove:
115
field.parent.remove(field)
0 commit comments