inc/parsers/links.php
Handles internal and external links.
External links can be without markup, with simple brackets using alternate text of http, https and mailto protocols.
Internal links can be double brackets using optional alternate text.
The code also handles the special cases for Special pages, Category links and links to Category pages and interlanguage links. You can also provide a function swInternalLinkHook(url, fields) to handle custom pseudo namespaces.
If the links are valid, they are simple a-tags, if they are not valid, it depends on the user. If the user has modify-rights, they are a-tags with the CSS class invalid. If not, they are shown as text but not as link.