I’m trying to get custom brackets working for bracket pairs like “{{ }}” or “[[ ]]”
Here is the code I use:
const state = EditorState.create({
doc: "Test closeBrackets here ",
extensions: [
basicSetup,
javascriptLanguage.data.of({
closeBrackets: { brackets: ["(", "[["] }
}),
javascript()
]
});
const view = new EditorView({ state, parent: editor.current });
Here is a sandbox to try it out: https://codesandbox.io/s/holy-breeze-6bbu7e?file=/src/App.js:359-682
This works well for a single symbol bracket (
but doesn’t for double symbol brackets [[
Is it intended behavior, am I doing something wrong or it’s a bug? Because I saw in comments people using double symbols for brackets, so I assume it might be some sort of regression