@bangle.dev/core
Advanced tools
Comparing version 0.8.0 to 0.9.0
@@ -12,2 +12,3 @@ import { keymap } from 'prosemirror-keymap'; | ||
} from './list-item/todo'; | ||
import { listIsTight } from './list-item/list-is-tight'; | ||
@@ -38,2 +39,11 @@ export const spec = specFactory; | ||
toDOM: () => ['ul', 0], | ||
attrs: { | ||
// a style preference attribute which be used for | ||
// rendering output. | ||
// For example markdown serializer can render a new line in | ||
// between or not. | ||
tight: { | ||
default: false, | ||
}, | ||
}, | ||
}, | ||
@@ -47,2 +57,5 @@ markdown: { | ||
block: name, | ||
getAttrs: (_, tokens, i) => { | ||
return { tight: listIsTight(tokens, i) }; | ||
}, | ||
}, | ||
@@ -49,0 +62,0 @@ }, |
@@ -6,2 +6,3 @@ import { toggleList } from './list-item/commands'; | ||
import { parentHasDirectParentOfType } from '../core-commands'; | ||
import { listIsTight } from './list-item/list-is-tight'; | ||
@@ -27,2 +28,9 @@ export const spec = specFactory; | ||
}, | ||
// a style preference attribute which be used for | ||
// rendering output. | ||
// For example markdown serializer can render a new line in | ||
// between or not. | ||
tight: { | ||
default: false, | ||
}, | ||
}, | ||
@@ -57,2 +65,8 @@ content: 'listItem+', | ||
block: name, | ||
getAttrs: (tok, tokens, i) => { | ||
return { | ||
tight: listIsTight(tokens, i), | ||
order: +tok.attrGet('start') || 1, | ||
}; | ||
}, | ||
}, | ||
@@ -59,0 +73,0 @@ }, |
{ | ||
"name": "@bangle.dev/core", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"homepage": "https://bangle.dev", | ||
@@ -5,0 +5,0 @@ "authors": [ |
519969
94
18933