- Strip trailing `?query` and/or `#anchor`
- Strip leading `./` recursively
- Check if what's left is `""` or `"."`
Any link that targets the current page should be left as-is (no-op).
We are essentially writing GFM e.g. inline HTML comments and GFM alerts.
So tell pandoc to parse/render as such. This resolves issues such as:
`> [!TIP]` being escaped to `> \[!TIP\]`.
The README/CONTRIBUTING files are authored with GitHub in mind, but we
want to re-use them for the docs website.
Replace the existing simple substitution with a pandoc AST-based filter.