prosemirror-codemark
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -44,2 +44,8 @@ "use strict"; | ||
const nextCode = !!markType.isInSet((_a = pos.marksAcross(doc.resolve(selection.from + 1))) !== null && _a !== void 0 ? _a : []); | ||
if (pos.pos === view.state.doc.nodeSize - 3 && (pluginState === null || pluginState === void 0 ? void 0 : pluginState.decorations)) { | ||
// Behaviour stops: `code`| at the end of the document | ||
const meta = { action: 'add', pos: selection.from }; | ||
view.dispatch(view.state.tr.removeStoredMark(markType).setMeta(plugin, meta)); | ||
return true; | ||
} | ||
if (inCode === nextCode && pos.parentOffset !== 0) | ||
@@ -98,3 +104,3 @@ return false; | ||
const meta = { action: 'add', pos: selection.from, side: -1 }; | ||
view.dispatch(view.state.tr.addStoredMark(markType.create()).setMeta(plugin, meta)); | ||
view.dispatch(view.state.tr.removeStoredMark(markType).setMeta(plugin, meta)); | ||
return true; | ||
@@ -101,0 +107,0 @@ } |
{ | ||
"name": "prosemirror-codemark", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Inline code mark for ProseMirror", | ||
@@ -5,0 +5,0 @@ "author": "Rowan Cockett <rowan@curvenote.com>", |
@@ -26,3 +26,3 @@ # `prosemirror-codemark` | ||
- Select a word and hit `` ` `` | ||
- Make sure the next charated makes sense (e.g. `removeStoredMarks`) | ||
- Make sure the next character makes sense (e.g. `removeStoredMarks`) | ||
- Show a visual cursor in the correct location if the next character will or will not be in the inline code | ||
@@ -29,0 +29,0 @@ - Allow arrow keys to enter/exit into the inline code |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57953
559