We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23b7846 commit cc4e860Copy full SHA for cc4e860
packages/plugins/preset-gfm/src/node/table/input.ts
@@ -30,11 +30,9 @@ export const insertTableInputRule = $inputRule(
30
)
31
return null
32
33
- const tableNode = createTable(
34
- ctx,
35
- Number(match.groups?.row),
36
- Number(match.groups?.col)
37
- )
+ const row = Math.max(Number(match.groups?.row ?? 0), 2)
+
+ const tableNode = createTable(ctx, row, Number(match.groups?.col))
38
const tr = state.tr.replaceRangeWith(start, end, tableNode)
39
return tr
40
.setSelection(TextSelection.create(tr.doc, start + 3))
@@ -70,7 +68,7 @@ export const tableKeymap = $useKeymap('tableKeymap', {
70
68
},
71
69
72
ExitTable: {
73
- shortcuts: ['Mod-Enter'],
+ shortcuts: ['Mod-Enter', 'Enter'],
74
command: (ctx) => {
75
const commands = ctx.get(commandsCtx)
76
0 commit comments