Skip to content

Commit 1a1497e

Browse files
authored
fix history links (#4866)
1 parent 4f13260 commit 1a1497e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/build/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def main() -> int:
1212
history = (PROJECT_ROOT / 'HISTORY.md').read_text()
13-
history = re.sub(r'#(\d+)', r'[#\1](https://github.com/pydantic/pydantic/issues/\1)', history)
13+
history = re.sub(r'(\s)#(\d+)', r'\1[#\2](https://github.com/pydantic/pydantic/issues/\2)', history)
1414
history = re.sub(r'(\s)@([\w\-]+)', r'\1[@\2](https://github.com/\2)', history, flags=re.I)
1515
history = re.sub('@@', '@', history)
1616

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def extra(self):
6060
THIS_DIR = Path(__file__).resolve().parent
6161
try:
6262
history = (THIS_DIR / 'HISTORY.md').read_text(encoding='utf-8')
63-
history = re.sub(r'#(\d+)', r'[#\1](https://github.com/pydantic/pydantic/issues/\1)', history)
63+
history = re.sub(r'(\s)#(\d+)', r'\1[#\2](https://github.com/pydantic/pydantic/issues/\2)', history)
6464
history = re.sub(r'( +)@([\w\-]+)', r'\1[@\2](https://github.com/\2)', history, flags=re.I)
6565
history = re.sub('@@', '@', history)
6666

0 commit comments

Comments
 (0)