Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
011edba5
Commit
011edba5
authored
Sep 01, 2021
by
Miranda Fluharty
Committed by
Savas Vedova
Sep 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use selected syntax highlighting theme in code block component
parent
f39beb16
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
app/assets/javascripts/vue_shared/components/code_block.vue
app/assets/javascripts/vue_shared/components/code_block.vue
+6
-1
app/assets/stylesheets/framework/blocks.scss
app/assets/stylesheets/framework/blocks.scss
+0
-2
spec/frontend/vue_shared/components/__snapshots__/code_block_spec.js.snap
...e_shared/components/__snapshots__/code_block_spec.js.snap
+2
-2
No files found.
app/assets/javascripts/vue_shared/components/code_block.vue
View file @
011edba5
...
...
@@ -24,8 +24,13 @@ export default {
return
isScrollable
?
scrollableStyles
:
null
;
},
},
userColorScheme
:
window
.
gon
.
user_color_scheme
,
};
</
script
>
<
template
>
<pre
class=
"code-block rounded"
:style=
"styleObject"
><code
class=
"d-block"
>
{{
code
}}
</code></pre>
<pre
class=
"code-block rounded code"
:class=
"$options.userColorScheme"
:style=
"styleObject"
><code
class=
"d-block"
>
{{
code
}}
</code></pre>
</
template
>
app/assets/stylesheets/framework/blocks.scss
View file @
011edba5
...
...
@@ -337,8 +337,6 @@
}
.code-block
{
background
:
$black
;
color
:
$gray-darkest
;
white-space
:
pre
;
overflow-x
:
auto
;
font-size
:
12px
;
...
...
spec/frontend/vue_shared/components/__snapshots__/code_block_spec.js.snap
View file @
011edba5
...
...
@@ -2,7 +2,7 @@
exports[`Code Block with default props renders correctly 1`] = `
<pre
class="code-block rounded"
class="code-block rounded
code
"
>
<code
class="d-block"
...
...
@@ -14,7 +14,7 @@ exports[`Code Block with default props renders correctly 1`] = `
exports[`Code Block with maxHeight set to "200px" renders correctly 1`] = `
<pre
class="code-block rounded"
class="code-block rounded
code
"
style="max-height: 200px; overflow-y: auto;"
>
<code
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment