refactoring

This commit is contained in:
Philipp Kühn 2021-02-07 20:02:59 +01:00
parent 8943f8b9ae
commit 67018ce043

View File

@ -16,7 +16,7 @@ export default function (doc: Node): DecorationSet {
const color = match[0] const color = match[0]
const index = match.index || 0 const index = match.index || 0
const from = position + index const from = position + index
const to = position + index + color.length const to = from + color.length
const decoration = Decoration.inline(from, to, { const decoration = Decoration.inline(from, to, {
class: 'color', class: 'color',
style: `--color: ${color}`, style: `--color: ${color}`,