Closed o1y closed 1 year ago
Hey Oli. This is an interesting one! It's due to a combination of behaviours, but the short answer is: href
isn't actually a default/required attribute of the link mark, so you shouldn't assume it'll be there.
The long answer, and reason this only happens when you have data like that is:
href
is missing.The legacy prosemirror-to-html
package handled the tag rendering differently, which is why this has only cropped up with v2.
I'm not sure there's any way for me to work around this in Mutator, but I'll give it some thought.
Thanks for your good explanation, Jack! When href
is not a default attribute of the link
mark, then this is definately not a bug. So, feel free to close this issue.
Initially, I found it a bit confusing because both 'href' values were being set, but you clarified what happens in the tiptap
background :)
Yeah it's certainly best to check for the href
, but it would be nice if Mutators "skip closing tags” behaviour could handle this situation, as it would make things more consistent.
I’ve had an idea for a change that I’m gonna test out, so I’ll leave this open for now. 👍
Wow, cool, thanks! 🚀
Bug Description
Not sure if this is a Bard Mutator bug, but I came across an issue since Bard Mutator 2 when having a
link
, which contains multiple marks. Bard Mutator then returns just for the first link mark thehref
attribute. In the second markhref
is not available, which may cause an error if no proper check is implemented.How to Reproduce
Environment