diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-11 21:16:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-11 21:16:38 +0300 |
commit | b330f7f0bfb2035b03e84e5fa751816b6ad9b841 (patch) | |
tree | 5dd72fddc7545c3fb6c5bff6b662bea3dea54d79 /app/assets/javascripts/content_editor | |
parent | a8281ac43424e4b820286823bdb48f068b21d7d3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/content_editor')
-rw-r--r-- | app/assets/javascripts/content_editor/components/wrappers/frontmatter.vue | 2 | ||||
-rw-r--r-- | app/assets/javascripts/content_editor/extensions/code_block_highlight.js | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/app/assets/javascripts/content_editor/components/wrappers/frontmatter.vue b/app/assets/javascripts/content_editor/components/wrappers/frontmatter.vue index 97b69afd12e..e8829d00986 100644 --- a/app/assets/javascripts/content_editor/components/wrappers/frontmatter.vue +++ b/app/assets/javascripts/content_editor/components/wrappers/frontmatter.vue @@ -20,7 +20,7 @@ export default { }; </script> <template> - <node-view-wrapper class="gl-relative code highlight" as="pre"> + <node-view-wrapper class="content-editor-code-block gl-relative code highlight" as="pre"> <span data-testid="frontmatter-label" class="gl-absolute gl-top-0 gl-right-3" diff --git a/app/assets/javascripts/content_editor/extensions/code_block_highlight.js b/app/assets/javascripts/content_editor/extensions/code_block_highlight.js index ea51bee3ba9..9dc17fcd570 100644 --- a/app/assets/javascripts/content_editor/extensions/code_block_highlight.js +++ b/app/assets/javascripts/content_editor/extensions/code_block_highlight.js @@ -19,7 +19,14 @@ export default CodeBlockLowlight.extend({ }; }, renderHTML({ HTMLAttributes }) { - return ['div', ['pre', HTMLAttributes, ['code', {}, 0]]]; + return [ + 'pre', + { + ...HTMLAttributes, + class: `content-editor-code-block ${HTMLAttributes.class}`, + }, + ['code', {}, 0], + ]; }, }).configure({ lowlight, |