-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
markText error when using inclusiveRight/inclusiveLeft with two markers on the same line #3998
Comments
This is intentional. Collapsed/replaced markers can not partially overlap, and by having them both be inclusive on the side where they touch, they would start overlapping as soon as anything in inserted between them. So that's not allowed. |
@marijnh Thank you for your very quick reply. Maybe I am missing something but in this example the two markers are separated by a character "-" (it could have been a longer string, the behaviour remains the same). Does this mean that we can not render multiple markers on a single line if all of them are |
Oh, if they are not touching this should definitely be valid. I'll look into this later. |
Found it. See attached patch. |
@marijnh thank you |
Running this example on CodeMirror's homepage:
The first marker is correctly rendered.
The second marker is not rendered and an error occurs: "Inserting collapsed marker partially overlapping an existing one".
When removing
inclusiveRight: true
or/andinclusiveLeft: true
everything works fine.It seems to be related with #2629.
This error occurs with CodeMirror 5.1.0 and 5.14.3 on Firefox and Chrome.
The text was updated successfully, but these errors were encountered: