* fix: anchors and query strings do not work
Since the change from UDIs to localLinks in href, the pattern matched a little too much in the href section completely ignoring any "extras" such as querystrings and anchors after the locallink, which meant that the locallink did not get replaced at all if they were present. This is fixed by limiting the regexp a bit.
* fix: legacy links do not follow the same regexp as new links
Because we are no longer matching the whole `href` attribute but only some of its contents, we need to fix up the old pattern. It has been extended with matching groups that follow the same pattern as the new links.
* feat: allow a-tags to be multiline
example:
```html
<a
type="document"
href="/{localLink:<GUID>}">
Test
</a>
```
* fix: split regex into two parts: first a tokenizer for a-tags and then a type-finder
* fix: ensure only "document" and "media" are matching to speed up the pattern
* feat: allow a-tags to be multiline
(cherry picked from commit 35e8f2e460)