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
fe519102
Commit
fe519102
authored
Sep 04, 2020
by
Enrique Alcantara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an extra line break at the end of a ref definition
parent
5b63ea38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
app/assets/javascripts/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer.js
...ontent_editor/services/build_html_to_markdown_renderer.js
+1
-1
spec/frontend/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer_spec.js
...t_editor/services/build_html_to_markdown_renderer_spec.js
+3
-1
No files found.
app/assets/javascripts/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer.js
View file @
fe519102
...
...
@@ -96,7 +96,7 @@ const buildHTMLToMarkdownRender = (baseRenderer, formattingPreferences = {}) =>
const
isReferenceDefinition
=
Boolean
(
node
.
dataset
.
sseReferenceDefinition
);
return
isReferenceDefinition
?
`\n\n
${
node
.
innerText
}
\n`
?
`\n\n
${
node
.
innerText
}
\n
\n
`
:
baseRenderer
.
convert
(
node
,
subContent
);
},
};
...
...
spec/frontend/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer_spec.js
View file @
fe519102
...
...
@@ -178,7 +178,9 @@ describe('rich_content_editor/services/html_to_markdown_renderer', () => {
});
it
(
'
returns raw text when pre node has sse-reference-definitions class
'
,
()
=>
{
expect
(
htmlToMarkdownRenderer
[
'
PRE CODE
'
](
node
,
subContent
)).
toBe
(
`\n\n
${
node
.
innerText
}
\n`
);
expect
(
htmlToMarkdownRenderer
[
'
PRE CODE
'
](
node
,
subContent
)).
toBe
(
`\n\n
${
node
.
innerText
}
\n\n`
,
);
});
it
(
'
returns base result when pre node does not have sse-reference-definitions class
'
,
()
=>
{
...
...
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