The previous pattern [^\!]\[...\] required exactly one non-! character
before the opening bracket, so a markdown link at the very start of
anchors to start-of-string or a non-! character without consuming
a required preceding character.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
http.DetectContentType was called with potentially nil/empty contents
when ReadFile failed; the error was only checked afterward. Move the
error check immediately after ReadFile so bad data is never used.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously, relative markdown links only resolved to Confluence pages.
Now the lookup also searches for blog posts if a page is not found,
enabling links like [My Blog](./blog-post.md) to work correctly.