Create components for highlighting vulnerability source code
What does this MR do and why?
What:
- create a new component called
vulnerability_file_content_viewer
that also highlighting by boolean input - update our Highlight.js implementation to be re-usable in other contexts
Why:
- Currently there is no component that highlighting a few lines as required in 'Code Flow', so to handle this we need to refactor a little bit the
language highlight plugin
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.
The screenshots should be the same.
The code in the screenshots (ee/app/assets/javascripts/vulnerabilities/components/vulnerability_file_contents.vue
) is using now vulnerability-file-content-viewer
.
Before | After |
---|---|
How to set up and validate locally
nothing
Related to #469653 (closed) and #458062
Edited by Jacques Erasmus