diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-03 06:19:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-03 06:19:02 +0300 |
commit | 820c625f4624bd79a23d661d5027c5e19070ca2f (patch) | |
tree | 02e1dec873b3e66065a8fb59208e115db78871d6 /app/assets/javascripts/content_editor | |
parent | 475d5a7a176dcb87bd1fb8d55883ad2b3b2a7955 (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/services/serialization_helpers.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/content_editor/services/serialization_helpers.js b/app/assets/javascripts/content_editor/services/serialization_helpers.js index 4d5a54c0347..5fdd294aa96 100644 --- a/app/assets/javascripts/content_editor/services/serialization_helpers.js +++ b/app/assets/javascripts/content_editor/services/serialization_helpers.js @@ -259,11 +259,16 @@ export function renderContent(state, node, forceRenderInline) { } } -export function renderHTMLNode(tagName, forceRenderInline = false) { +export function renderHTMLNode(tagName, forceRenderContentInline = false) { return (state, node) => { renderTagOpen(state, tagName, node.attrs); - renderContent(state, node, forceRenderInline); + renderContent(state, node, forceRenderContentInline); renderTagClose(state, tagName, false); + + if (forceRenderContentInline) { + state.closeBlock(node); + state.flushClose(); + } }; } |