Add support for highlighting sub-languages
Currently when viewing a file containing a sub-language (HTML containing CSS for example) only the primary language is highlighted and the sub-language is treated as plain text. ![Screenshot_2022-11-14_at_04.33.34](/uploads/667476a78864f2d5ea114a9fe7201782/Screenshot_2022-11-14_at_04.33.34.png) This happens because we only [load the core](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/vue_shared/components/source_viewer/source_viewer.vue#L163) of Highlight.js and then register the primary language that was detected by Rouge. This is done in order to keep the HLJS footprint as small as possible. We should find a way to load the primary language as well as any other language that was detected. ### Possible solution The frontend relies on the [`language` field](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/graphql/types/repository/blob_type.rb#L130) which currently only contains the primary language detected by Rouge. We could pass a list of languages detected by Rouge to the frontend instead.
issue