Skip to content

Commit bb0368a

Browse files
committed
PRS: Update implementation
1 parent 419fbfe commit bb0368a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pep_sphinx_extensions/pep_processor/transforms/pep_headers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from pathlib import Path
24
import re
35

@@ -92,7 +94,7 @@ def apply(self) -> None:
9294
elif name in {"last-modified", "content-type", "version"}:
9395
# Mark unneeded fields
9496
fields_to_remove.append(field)
95-
elif name in {"post-history"}:
97+
elif name == "post-history":
9698
body[0][:] = _process_post_history(body)
9799

98100
# Remove unneeded fields
@@ -129,8 +131,8 @@ def _process_post_history(body: nodes.field_body) -> list[nodes.Text | nodes.ref
129131
date, uri = pair.split(maxsplit=1)
130132
node = nodes.reference("",
131133
date.strip(),
132-
refuri=uri.strip(" \f\n\r\t><"),
133-
internal=False
134+
refuri=uri.strip(" \n\r\t><"),
135+
internal=False,
134136
)
135137
except ValueError:
136138
node = nodes.Text(pair)

0 commit comments

Comments
 (0)