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
daf545a2
Commit
daf545a2
authored
Mar 11, 2020
by
Denys Mishunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed markdown rendering of Snippet description
parent
0cfb4ae0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
app/assets/javascripts/snippets/components/snippet_title.vue
app/assets/javascripts/snippets/components/snippet_title.vue
+1
-1
app/assets/javascripts/snippets/fragments/snippetBase.fragment.graphql
...vascripts/snippets/fragments/snippetBase.fragment.graphql
+1
-0
spec/frontend/snippets/components/snippet_title_spec.js
spec/frontend/snippets/components/snippet_title_spec.js
+3
-1
No files found.
app/assets/javascripts/snippets/components/snippet_title.vue
View file @
daf545a2
...
...
@@ -21,7 +21,7 @@ export default {
{{
snippet
.
title
}}
</h2>
<div
v-if=
"snippet.description"
class=
"description"
data-qa-selector=
"snippet_description"
>
<div
class=
"md
"
>
{{
snippet
.
description
}}
</div>
<div
class=
"md
js-snippet-description"
v-html=
"snippet.descriptionHtml"
>
</div>
</div>
<small
v-if=
"snippet.updatedAt !== snippet.createdAt"
class=
"edited-text"
>
...
...
app/assets/javascripts/snippets/fragments/snippetBase.fragment.graphql
View file @
daf545a2
...
...
@@ -2,6 +2,7 @@ fragment SnippetBase on Snippet {
id
title
description
descriptionHtml
createdAt
updatedAt
visibilityLevel
...
...
spec/frontend/snippets/components/snippet_title_spec.js
View file @
daf545a2
...
...
@@ -6,10 +6,12 @@ describe('Snippet header component', () => {
let
wrapper
;
const
title
=
'
The property of Thor
'
;
const
description
=
'
Do not touch this hammer
'
;
const
descriptionHtml
=
`<h2>
${
description
}
</h2>`
;
const
snippet
=
{
snippet
:
{
title
,
description
,
descriptionHtml
,
},
};
...
...
@@ -35,7 +37,7 @@ describe('Snippet header component', () => {
it
(
'
renders snippets title and description
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
text
().
trim
()).
toContain
(
title
);
expect
(
wrapper
.
text
().
trim
()).
toContain
(
description
);
expect
(
wrapper
.
find
(
'
.js-snippet-description
'
).
element
.
innerHTML
).
toBe
(
descriptionHtml
);
});
it
(
'
does not render recent changes time stamp if there were no updates
'
,
()
=>
{
...
...
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