mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 04:04:06 +02:00
change offset key serialization to allow dashes in keys, fixes #474
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @type {RegExp}
|
||||
*/
|
||||
|
||||
const PARSER = /^(\w+)(?:-(\d+))?$/
|
||||
const PARSER = /^(\w+)(?::(\d+))?$/
|
||||
|
||||
/**
|
||||
* Parse an offset key `string`.
|
||||
@@ -34,7 +34,7 @@ function parse(string) {
|
||||
*/
|
||||
|
||||
function stringify(object) {
|
||||
return `${object.key}-${object.index}`
|
||||
return `${object.key}:${object.index}`
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user