markupeditor 0.9.51 → 0.9.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/markup-editor.js +10 -1
- package/package.json +1 -1
package/dist/markup-editor.js
CHANGED
|
@@ -42044,7 +42044,16 @@ const codeHighlightPlugin = new Plugin({
|
|
|
42044
42044
|
}
|
|
42045
42045
|
},
|
|
42046
42046
|
props: {
|
|
42047
|
-
|
|
42047
|
+
// The code_block holding the selection is left unhighlighted. Highlighting
|
|
42048
|
+
// wraps the text in spans that are rebuilt as it changes, which breaks the
|
|
42049
|
+
// system's inline predictions while typing. The block is highlighted again
|
|
42050
|
+
// when the selection leaves it.
|
|
42051
|
+
decorations(state) {
|
|
42052
|
+
const {decorations} = codeHighlightPlugin.getState(state);
|
|
42053
|
+
const editing = codeBlockAtSelection(state);
|
|
42054
|
+
if (!editing) return decorations
|
|
42055
|
+
return decorations.remove(decorations.find(editing.pos, editing.pos + editing.node.nodeSize))
|
|
42056
|
+
}
|
|
42048
42057
|
}
|
|
42049
42058
|
});
|
|
42050
42059
|
|