Commit 3f0c60f
committed
refactor: replace regex with str.startswith and add raw-file URL mapping
Per review suggestion from hugovk:
- Replace re.match with str.startswith for clarity (re.match anchors start
but not end, which can be confusing)
- Also handle hg.python.org/cpython/raw-file/ URLs, mapping them to
raw.githubusercontent.com (e.g. Python 2.7.3 release notes use this form)1 parent f0514fd commit 3f0c60f
1 file changed
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
138 | 149 | | |
139 | 150 | | |
140 | 151 | | |
| |||
0 commit comments