Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Add permalinks to Slate.js source code pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
silviubogan committed Oct 18, 2021
1 parent 25a02b5 commit 055e424
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/utils/volto-blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ function fromEntries(pairs) {

/**
* Taken from Slate.js.
*
* @param {*} editor
* @param {*} path
* @returns
* https://github.com/ianstormtaylor/slate/blob/a2558b37b020160daa7a64a98a38a84beba464dd/packages/slate/src/transforms/node.ts#L1031
*
* @param {*} editor
* @param {*} path
* @returns
*/
const matchPath = (editor, path) => {
const [node] = Editor.node(editor, path);
Expand All @@ -33,9 +34,11 @@ const matchPath = (editor, path) => {

/**
* Taken from Slate.js.
* @param {*} editor
* @param {*} node
* @returns
* https://github.com/ianstormtaylor/slate/blob/a2558b37b020160daa7a64a98a38a84beba464dd/packages/slate/src/transforms/node.ts#L999
*
* @param {*} editor
* @param {*} node
* @returns
*/
const hasSingleChildNest = (editor, node) => {
if (Element.isElement(node)) {
Expand Down

0 comments on commit 055e424

Please sign in to comment.