Skip to content

Fix source code highlighting when using relative URL

Jacques Erasmus requested to merge 437084-fix-worker-relative-path into master

What does this MR do and why?

The source code is not highlighted when viewing source code on an instance configured with a relative URL. This is because the highlight.js language definition file was not being loaded from the correct location.

This MR updates the worker-loader to resolve to the correct public path

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-01-17_at_10.39.01 Screenshot_2024-01-17_at_10.39.32

How to set up and validate locally

  • Configure GDK with a relative URL
    • Add relative_url_root: "/relative" to /gdk.yml
  • Reconfigure GDK with gdk reconfigure
  • Restart GDK with gdk restart
  • Open a Source code file via the repository files browser
  • The syntax should be highlighted as expected

Related to #437084 (closed)

Edited by Jacques Erasmus

Merge request reports

Loading