Code / sub marks intersection

Hello, I’ve got code, sup and del marks.

When I make code mark and after that partially del it works as expected - it created del mark inside code mark. When I make sup mark inside code mark it breaks code mark into multiple ones.

Output html:

<p>h<code>e<del>l</del>lo </code><sub><code>wo</code></sub><code>rld</code></p>

Expected html:

<p>h<code>e<del>l</del>lo <sub>wo</sub>rld</code></p>

I didn’t find any differences in del and sub configurations except for different tags How can I prevent it from splitting code block?

The order in which marks appear in your schema definition determines the order in which they are nested.

Is it possible to control nesting any other way? Suppose I don’t want any nesting - make most / all of them flat

I don’t understand how you expect to be able to apply multiple marks to a given piece of content without nesting mark elements.

nesting is ok. The problem is that it splits mark. I want to cancel this splitting.

Original html:
<code>hello world</code>

When I’m trying to mark wo with sub mark it splits code into three tags:
<code>hello </code><sub><code>wo</code></sub><code>rld</code>

I don’t need it. I just need to wrap wo with sub tag:
<code>hello <sub>wo</sub>rld</code>

That’s not possible with this library. It uses a fixed nesting order, which will always produce some splitting for some types of content.