Ensure scoped labels display properly in source code md preview

What does this MR do and why?

The style attr was being stripped from all elements in the rich viewer, but it only needs to be stripped in snippets for security purposes. This MR re-allows it so that style attributes on labels can be passed to define label colors.

References

Screenshots or screen recordings

Before After
Screenshot_2025-06-11_at_11.39.35 Screenshot_2025-06-11_at_11.39.26

How to set up and validate locally

  1. Check out this branch
  2. Edit or create a markdown file in a code repository in the GDK
  3. Add a scoped label that exists in the project to the markdown file
  4. Save and view the markdown file's preview
  5. You will see the scoped label rendered properly

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #515420 (closed)

Merge request reports

Loading