Commit fe519102 authored by Enrique Alcantara's avatar Enrique Alcantara

Add an extra line break at the end of a ref definition

parent 5b63ea38
......@@ -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);
},
};
......
......@@ -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', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment