Render markdown for snippets if links contain hash to anchor
What does this MR do and why?
Links to markdown snippets did not render the markdown if the link contained a hash.
This MR modifies the logic to render the markdown if there is a hash that does not start with #LC (which is used to link and highlight lines in the source code).
Screenshots or screen recordings
N/A
How to set up and validate locally
- Create a snippet with some markdown headers
- Visit the snippet directly and observe markdown renders
- Link to a specific header
- Visit URL with linked header in a new tab
- Observe that the markdown no longer renders
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #375182 (closed)