Skip to content

Commit de3aef3

Browse files
committed
fix: input rule
1 parent 873b87c commit de3aef3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/src/utils/tiptap/extensions/binding.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ export const Binding = Node.create<BindingAttrs>({
6969
addInputRules() {
7070
return [
7171
new InputRule({
72-
find: /\{\{\s*([^\s|}]+)(?:\s*\|\|\s*([^\s}][^}]*))?\}\}/,
72+
// eslint-disable-next-line regexp/no-unused-capturing-group
73+
find: /\{\{\s*([^\|\s}]+)\s*(?:\|\|\s*([^}]+))?\s*}}$/,
7374
handler: ({ state, range, match }) => {
7475
const [, name, def] = match as RegExpMatchArray
7576
const attrs = sanitize({ value: name, defaultValue: def })

0 commit comments

Comments
 (0)