mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-03-24 23:29:47 +01:00
Landing this without a changeset as it's simply a test to cover a previously accepted fix.
This commit is contained in:
parent
8def57665c
commit
e6faf8e08d
@ -0,0 +1,29 @@
|
||||
/** @jsx jsx */
|
||||
import { Editor } from 'slate'
|
||||
import { jsx } from '../../../..'
|
||||
|
||||
export const input = (
|
||||
<editor>
|
||||
<block>
|
||||
<text />
|
||||
<inline>o</inline>
|
||||
<text />
|
||||
</block>
|
||||
</editor>
|
||||
)
|
||||
|
||||
export const test = editor => {
|
||||
return Array.from(
|
||||
Editor.positions(editor, {
|
||||
at: Editor.range(editor, []),
|
||||
unit: 'character',
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
// this is the output but it's incorrect.
|
||||
// there should be two positions, before the character and after the character
|
||||
export const output = [
|
||||
{ path: [0, 0], offset: 0 },
|
||||
{ path: [0, 1, 0], offset: 1 },
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user