bors 434e718b67 Auto merge of #12605 - erhuve:fix/determine-doc-link-type-at-start, r=erhuve
fix: doc_links link type - Determine link type at start (fixes #12601)

fixes #12601
Looked like autolink/inline mismatch happened because end_link_type was parsed from the Text/Code events.
I changed it to be determined from the Start event, which should hopefully remain accurate while staying true to the cases where link type may need to be changed, according to the comment
```
// normally link's type is determined by the type of link tag in the end event,
// however in some cases we want to change the link type, for example,
// `Shortcut` type doesn't make sense for url links
```
Hopefully this is the desired behavior?
![Untitled](https://user-images.githubusercontent.com/59463268/174696581-3b1140a5-cdf0-4eda-9a11-ec648e4e7d21.gif)
2022-06-23 23:15:33 +00:00
..
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00
2022-06-23 20:08:29 +02:00
2022-06-23 20:08:29 +02:00
2022-06-23 20:08:29 +02:00
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00
2022-06-20 20:34:08 +02:00
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00
2022-06-10 17:30:02 +02:00