- Make flow of logic more compact. It reduces 12 code lines.
- Use filter for simple element removal. Unless there are lots of elements, breaking a loop doesn't actually have practical benefit.
- More flexible. It would be easier to edit even if argument is changed
to option pack (json).
i verified that the actual transaction does not contain the last matching char
tr.doc.textBetween(start, end+1) will miss the triggering char at the end
Directive `slot-scope` is deprecated as of Vue v2.6.0. See [here](https://vuejs.org/v2/guide/components-slots.html) for details. Currently tiptap depends on Vue ^2.6.10. So this commit introduces new directive `v-slot` on README.md and examples.
add another layer of matching by introducing support for second match group
since javascript (at least in current browsers) still lacks lookbehind in regex
so now supports
/nomatch(markstart(text)markend)nomatch/ and still supports the
/markstart(text)markend/ syntax
all `nomatch` will be kept as is so kindof simulating lookbehinds
this skips links in markPasteRules (Bold, Italic, Code, Strike, Underline)
fixes#258
works only if link extension is added before mark extensions
extensions: [
...
new Link(),
...
new Italic(),
new Bold(),
new Code(),
new Strike(),
new Underline(),
...
]
getMarkRange() will not return the actual end position of the current mark.
might reintroduce bug from #156 (i cannot reproduce #156 so i cannot check)
fixes in this commit:
A) work around a possible bug in indexAfter()?:
$pos.indexAfter() seems to return the same index as $pos.index() at some point
-> fixed by increasing startIndex by 1 instead of using indexAfter()
B) endPos needs to be initialized with initial startPos + nodeSize and not
with resulting startPos:
-> moved initialization right after setting startPos