Commit 4c12cbd
committed
Fix external links with anchors being rewritten as relative doc links
Protect <a href="https?://..."> links from linkify so identifiers in the
URL fragment (e.g. #django.http.HttpResponseNotFound) or in the link text
are not turned into relative documentation links. Mask such links with
placeholders before linkify, then restore them after.1 parent 16e00b6 commit 4c12cbd
2 files changed
Lines changed: 53 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
309 | 334 | | |
310 | 335 | | |
311 | 336 | | |
| |||
319 | 344 | | |
320 | 345 | | |
321 | 346 | | |
322 | | - | |
323 | 347 | | |
324 | 348 | | |
325 | 349 | | |
| |||
401 | 425 | | |
402 | 426 | | |
403 | 427 | | |
404 | | - | |
405 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
406 | 432 | | |
407 | 433 | | |
408 | 434 | | |
| |||
433 | 459 | | |
434 | 460 | | |
435 | 461 | | |
436 | | - | |
| 462 | + | |
437 | 463 | | |
438 | 464 | | |
439 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
0 commit comments