Use case: i have two kinds of paragraphs: p that can contain anchors, and p_nolink that can’t, and which can only be found in a blocklink, like this:
<p><a>link</a></p>
<a><p>no links</p></a>
p_nolink has obviously a parseRule with context: 'blocklink//'
.
However, i still need to declare p_nolink before p or else it’s p that will greedily be parsed first.
It works, but it’s easy to miss in more complicated setups. It would be good that prosemirror either:
- try to parse all nodes and decide which one has the more narrow context
- or add the possibility to negate a context as in
!blocklink//