You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When migrating from the deprecated richTextResolver to the new one storyblok/richtext, text's with a SHIFT+Enter (newline) do have a separate new line now.
Expected Behavior
Just one <br/> tag instead of two.
Current Behavior
Two br-tags are generated. I guess the one with a key attribute are correct, since the new RichTextResovler works like that, but the other one is incorrect.
<br key="br-4">
<br>
text
<br key="br-6">
<br>
The text was updated successfully, but these errors were encountered:
I still get this issue with 2.0.1 and 2.1.0. It seems like the released code doesn't include the latest changes. If I copy the code directly into my project and override the renderFn then it works fine.
As far as I can tell this is what the defaultRenderFn gets compiled into in the current releases - and it doesn't include the self closing logic.
function D(e, r = {}, a) {
const d = x(r);
return `<${d ? `${e} ${d}` : e}>${Array.isArray(a) ? a.join("") : a || ""}</${e}>`;
}
When migrating from the deprecated richTextResolver to the new one
storyblok/richtext
, text's with aSHIFT+Enter
(newline) do have a separate new line now.Expected Behavior
Just one
<br/>
tag instead of two.Current Behavior
Two
br
-tags are generated. I guess the one with akey
attribute are correct, since the new RichTextResovler works like that, but the other one is incorrect.The text was updated successfully, but these errors were encountered: